yii\base\Application::init PHP Method

init() public method

public init ( )
    public function init()
    {
        $this->state = self::STATE_INIT;
        $this->bootstrap();
    }

Usage Example

コード例 #1
0
 /**
  * Initialize the application.
  */
 public function init()
 {
     parent::init();
     if ($this->enableCoreCommands) {
         foreach ($this->coreCommands() as $id => $command) {
             if (!isset($this->controllerMap[$id])) {
                 $this->controllerMap[$id] = $command;
             }
         }
     }
     // ensure we have the 'help' command so that we can list the available commands
     if (!isset($this->controllerMap['help'])) {
         $this->controllerMap['help'] = 'yii\\console\\controllers\\HelpController';
     }
 }