mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-06 14:19:23 +08:00
Component 'security' added tp the base application
This commit is contained in:
@ -30,6 +30,7 @@ use Yii;
|
|||||||
* read-only.
|
* read-only.
|
||||||
* @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime"
|
* @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime"
|
||||||
* subdirectory under [[basePath]].
|
* subdirectory under [[basePath]].
|
||||||
|
* @property \yii\base\Security $security The security application component.
|
||||||
* @property string $timeZone The time zone used by this application.
|
* @property string $timeZone The time zone used by this application.
|
||||||
* @property string $uniqueId The unique ID of the module. This property is read-only.
|
* @property string $uniqueId The unique ID of the module. This property is read-only.
|
||||||
* @property \yii\web\UrlManager $urlManager The URL manager for this application. This property is read-only.
|
* @property \yii\web\UrlManager $urlManager The URL manager for this application. This property is read-only.
|
||||||
@ -591,6 +592,15 @@ abstract class Application extends Module
|
|||||||
return $this->get('assetManager');
|
return $this->get('assetManager');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the security component.
|
||||||
|
* @return \yii\base\Security security component
|
||||||
|
*/
|
||||||
|
public function getSecurity()
|
||||||
|
{
|
||||||
|
return $this->get('security');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the core application components.
|
* Returns the core application components.
|
||||||
* @see set
|
* @see set
|
||||||
@ -605,6 +615,7 @@ abstract class Application extends Module
|
|||||||
'mailer' => ['class' => 'yii\swiftmailer\Mailer'],
|
'mailer' => ['class' => 'yii\swiftmailer\Mailer'],
|
||||||
'urlManager' => ['class' => 'yii\web\UrlManager'],
|
'urlManager' => ['class' => 'yii\web\UrlManager'],
|
||||||
'assetManager' => ['class' => 'yii\web\AssetManager'],
|
'assetManager' => ['class' => 'yii\web\AssetManager'],
|
||||||
|
'security' => ['class' => 'yii\base\Security'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ return [
|
|||||||
'yii\base\Object' => YII_PATH . '/base/Object.php',
|
'yii\base\Object' => YII_PATH . '/base/Object.php',
|
||||||
'yii\base\Request' => YII_PATH . '/base/Request.php',
|
'yii\base\Request' => YII_PATH . '/base/Request.php',
|
||||||
'yii\base\Response' => YII_PATH . '/base/Response.php',
|
'yii\base\Response' => YII_PATH . '/base/Response.php',
|
||||||
|
'yii\base\Security' => YII_PATH . '/base/Security.php',
|
||||||
'yii\base\Theme' => YII_PATH . '/base/Theme.php',
|
'yii\base\Theme' => YII_PATH . '/base/Theme.php',
|
||||||
'yii\base\UnknownClassException' => YII_PATH . '/base/UnknownClassException.php',
|
'yii\base\UnknownClassException' => YII_PATH . '/base/UnknownClassException.php',
|
||||||
'yii\base\UnknownMethodException' => YII_PATH . '/base/UnknownMethodException.php',
|
'yii\base\UnknownMethodException' => YII_PATH . '/base/UnknownMethodException.php',
|
||||||
@ -167,7 +168,6 @@ return [
|
|||||||
'yii\helpers\Inflector' => YII_PATH . '/helpers/Inflector.php',
|
'yii\helpers\Inflector' => YII_PATH . '/helpers/Inflector.php',
|
||||||
'yii\helpers\Json' => YII_PATH . '/helpers/Json.php',
|
'yii\helpers\Json' => YII_PATH . '/helpers/Json.php',
|
||||||
'yii\helpers\Markdown' => YII_PATH . '/helpers/Markdown.php',
|
'yii\helpers\Markdown' => YII_PATH . '/helpers/Markdown.php',
|
||||||
'yii\helpers\Security' => YII_PATH . '/helpers/Security.php',
|
|
||||||
'yii\helpers\StringHelper' => YII_PATH . '/helpers/StringHelper.php',
|
'yii\helpers\StringHelper' => YII_PATH . '/helpers/StringHelper.php',
|
||||||
'yii\helpers\Url' => YII_PATH . '/helpers/Url.php',
|
'yii\helpers\Url' => YII_PATH . '/helpers/Url.php',
|
||||||
'yii\helpers\VarDumper' => YII_PATH . '/helpers/VarDumper.php',
|
'yii\helpers\VarDumper' => YII_PATH . '/helpers/VarDumper.php',
|
||||||
|
Reference in New Issue
Block a user