The main different to the \luya\console\Controller is by adding default options to each command like the verbose and interactive properties you can always access and use. In addition there are some helper methods commonly used to build wizzwards within command controllers.
Author: Basil Suter (basil@nadar.io)
Inheritance: extends Controller
Beispiel #1
0
 /**
  * Initializer
  */
 public function init()
 {
     parent::init();
     // foreach scanFolders of all modules
     foreach (Yii::$app->modules as $id => $module) {
         if ($module instanceof \luya\base\Module) {
             foreach ($this->_scanFolders as $folderName) {
                 $this->addToDirectory($module->getBasePath() . DIRECTORY_SEPARATOR . $folderName, $folderName, '\\' . $module->getNamespace() . '\\' . $folderName, $module->id);
             }
         }
     }
     // foreach scanFolder inside the app namespace
     foreach ($this->_scanFolders as $folderName) {
         $this->addToDirectory(Yii::getAlias("@app/{$folderName}"), $folderName, '\\app\\' . $folderName, '@app');
     }
 }