From 54ac875e212cedf2383c03dcf78d45fef3d7fade Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Fri, 27 Jun 2014 14:26:51 +0300 Subject: [PATCH] Component 'security' added tp the base application --- framework/base/Application.php | 11 +++++++++++ framework/classes.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/framework/base/Application.php b/framework/base/Application.php index f94e36f..b599e6b 100644 --- a/framework/base/Application.php +++ b/framework/base/Application.php @@ -30,6 +30,7 @@ use Yii; * read-only. * @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime" * subdirectory under [[basePath]]. + * @property \yii\base\Security $security The security application component. * @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 \yii\web\UrlManager $urlManager The URL manager for this application. This property is read-only. @@ -592,6 +593,15 @@ abstract class Application extends Module } /** + * Returns the security component. + * @return \yii\base\Security security component + */ + public function getSecurity() + { + return $this->get('security'); + } + + /** * Returns the core application components. * @see set */ @@ -605,6 +615,7 @@ abstract class Application extends Module 'mailer' => ['class' => 'yii\swiftmailer\Mailer'], 'urlManager' => ['class' => 'yii\web\UrlManager'], 'assetManager' => ['class' => 'yii\web\AssetManager'], + 'security' => ['class' => 'yii\base\Security'], ]; } diff --git a/framework/classes.php b/framework/classes.php index 6fc5240..88ebbce 100644 --- a/framework/classes.php +++ b/framework/classes.php @@ -41,6 +41,7 @@ return [ 'yii\base\Object' => YII_PATH . '/base/Object.php', 'yii\base\Request' => YII_PATH . '/base/Request.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\UnknownClassException' => YII_PATH . '/base/UnknownClassException.php', 'yii\base\UnknownMethodException' => YII_PATH . '/base/UnknownMethodException.php', @@ -167,7 +168,6 @@ return [ 'yii\helpers\Inflector' => YII_PATH . '/helpers/Inflector.php', 'yii\helpers\Json' => YII_PATH . '/helpers/Json.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\Url' => YII_PATH . '/helpers/Url.php', 'yii\helpers\VarDumper' => YII_PATH . '/helpers/VarDumper.php',