/** * Sets options if they not exists. * Automatically executed after the task action. * * @return void */ protected function before() { if (empty($this->options['name'])) { $this->options['name'] = CLI::read(__('Task name')); } if (!in_array($this->options['template'], array_keys(CLI_Task_Scaffold::$templates))) { $this->options['template'] = CLI::read(__('Class template'), CLI_Task_Scaffold::$templates); } }
/** * Sets task name if it's not exist. * Automatically executed after the task action. * * @return void */ protected function before() { if (empty($this->options['name'])) { $this->options['name'] = CLI::read(__('Task name')); } }