Skip to content
PHP Ecosystem
Explore

Yii

classYii
Extendsyii\BaseYii
Since2.0
Sourceframework/Yii.php

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.

PropertyTypeDescriptionDefined by
$aliases staticarrayRegistered path aliases Default: ['@yii' => __DIR__].yii\BaseYii
$app staticyii\console\Application|yii\web\Application<yii\TUserIdentity>|nullThe application instance Default: null.yii\BaseYii
$container staticyii\di\ContainerThe dependency injection (DI) container used by createObject(). Default: null.yii\BaseYii
MethodDescriptionDefined by
beginProfile() staticMarks the beginning of a code block for profiling.yii\BaseYii
configure() staticConfigures an object with the initial property values.yii\BaseYii
createObject() staticCreates a new object using the given configuration.yii\BaseYii
debug() staticLogs a debug message.yii\BaseYii
endProfile() staticMarks the end of a code block for profiling.yii\BaseYii
error() staticLogs an error message.yii\BaseYii
getAlias() staticTranslates a path alias into an actual path.yii\BaseYii
getLogger() staticyii\BaseYii
getObjectVars() staticReturns the public member variables of an object.yii\BaseYii
getRootAlias() staticReturns the root alias part of a given alias.yii\BaseYii
getVersion() staticReturns a string representing the current version of the Yii framework.yii\BaseYii
info() staticLogs an informative message.yii\BaseYii
setAlias() staticRegisters a path alias.yii\BaseYii
setLogger() staticSets the logger object.yii\BaseYii
t() staticTranslates a message to the specified language.yii\BaseYii
warning() staticLogs a warning message.yii\BaseYii