bootstrap() protected method

This method is called by Application::init after the application has been fully configured. If you override this method, make sure you also call the parent implementation.
protected bootstrap ( )
コード例 #1
0
ファイル: Application.php プロジェクト: hakudjin/yii2
 /**
  * @inheritdoc
  */
 protected function bootstrap()
 {
     $request = $this->getRequest();
     Yii::setAlias('@webroot', dirname($request->getScriptFile()));
     Yii::setAlias('@web', $request->getBaseUrl());
     parent::bootstrap();
 }