Yii
API reference › Global namespace › Yii
Yii is a helper class serving common framework functionalities.
It extends from BaseYii which provides the actual implementation.
By writing your own Yii class, you can customize some functionalities of BaseYii.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$aliases static | array | Registered path aliases Default: ['@yii' => __DIR__]. | yii\ |
$app static | yii\|yii\<yii\ | The application instance Default: null. | yii\ |
$container static | yii\ | The dependency injection (DI) container used by createObject(). Default: null. | yii\ |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
beginProfile() static | Marks the beginning of a code block for profiling. | yii\ |
configure() static | Configures an object with the initial property values. | yii\ |
createObject() static | Creates a new object using the given configuration. | yii\ |
debug() static | Logs a debug message. | yii\ |
endProfile() static | Marks the end of a code block for profiling. | yii\ |
error() static | Logs an error message. | yii\ |
getAlias() static | Translates a path alias into an actual path. | yii\ |
getLogger() static | yii\ | |
getObjectVars() static | Returns the public member variables of an object. | yii\ |
getRootAlias() static | Returns the root alias part of a given alias. | yii\ |
getVersion() static | Returns a string representing the current version of the Yii framework. | yii\ |
info() static | Logs an informative message. | yii\ |
setAlias() static | Registers a path alias. | yii\ |
setLogger() static | Sets the logger object. | yii\ |
t() static | Translates a message to the specified language. | yii\ |
warning() static | Logs a warning message. | yii\ |