Class Yii
| Inheritance | Yii » yii\BaseYii |
|---|---|
| Available since version | 2.0 |
| Source Code | https://github.com/yiisoft/yii2/blob/master/framework/Yii.php |
Yii is a helper class serving common framework functionalities.
It extends from yii\BaseYii which provides the actual implementation. By writing your own Yii class, you can customize some functionalities of yii\BaseYii.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $aliases | array | Registered path aliases | yii\BaseYii |
| $app | yii\console\Application|yii\web\Application | The application instance | yii\BaseYii |
| $classMap | array | Class map used by the Yii autoloading mechanism. | yii\BaseYii |
| $container | yii\di\Container | The dependency injection (DI) container used by createObject(). | yii\BaseYii |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| autoload() | Class autoload loader. | yii\BaseYii |
| beginProfile() | Marks the beginning of a code block for profiling. | yii\BaseYii |
| configure() | Configures an object with the initial property values. | yii\BaseYii |
| createObject() | Creates a new object using the given configuration. | yii\BaseYii |
| debug() | Logs a debug message. | yii\BaseYii |
| endProfile() | Marks the end of a code block for profiling. | yii\BaseYii |
| error() | Logs an error message. | yii\BaseYii |
| getAlias() | Translates a path alias into an actual path. | yii\BaseYii |
| getLogger() | yii\BaseYii | |
| getObjectVars() | Returns the public member variables of an object. | yii\BaseYii |
| getRootAlias() | Returns the root alias part of a given alias. | yii\BaseYii |
| getVersion() | Returns a string representing the current version of the Yii framework. | yii\BaseYii |
| info() | Logs an informative message. | yii\BaseYii |
| powered() | Returns an HTML hyperlink that can be displayed on your Web page showing "Powered by Yii Framework" information. | yii\BaseYii |
| setAlias() | Registers a path alias. | yii\BaseYii |
| setLogger() | Sets the logger object. | yii\BaseYii |
| t() | Translates a message to the specified language. | yii\BaseYii |
| trace() | Alias of debug(). | yii\BaseYii |
| warning() | Logs a warning message. | yii\BaseYii |