original_string: public function init()
      {
          Yii::setAlias('@maintenance', $this->commandPath);
          if (!file_exists(Yii::getAlias('@maintenance'))) {
              FileHelper::createDirectory(Yii::getAlias('@maintenance'));
          }
          if (Yii::$app instanceof \yii\console\Application) {
              Yii::$app->controllerMap['maintenance'] = $this->consoleController;
          } else {
              if ($this->getIsEnabled()) {
                  $this->filtering();
              }
          }
      }
code: public function init()
      {
          Yii::setAlias('@maintenance', $this->commandPath);
          if (!file_exists(Yii::getAlias('@maintenance'))) {
              FileHelper::createDirectory(Yii::getAlias('@maintenance'));
          }
          if (Yii::$app instanceof \yii\console\Application) {
              Yii::$app->controllerMap['maintenance'] = $this->consoleController;
          } else {
              if ($this->getIsEnabled()) {
                  $this->filtering();
              }
          }
      }
code_tokens: public function init ( ) { Yii :: setAlias ( '@maintenance' , $ this -> commandPath ) ; if ( ! file_exists ( Yii :: getAlias ( '@maintenance' ) ) ) { FileHelper :: createDirectory ( Yii :: getAlias ( '@maintenance' ) ) ; } if ( Yii :: $ app instanceof \ yii \ console \ Application ) { Yii :: $ app -> controllerMap [ 'maintenance' ] = $ this -> consoleController ; } else { if ( $ this -> getIsEnabled ( ) ) { $ this -> filtering ( ) ; } } }
docstring: Initial component method.
  @since 0.2.0
docstring_tokens: Initial component method .