Ejemplo n.º 1
0
 /**
  * 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);
     }
 }
Ejemplo n.º 2
0
 /**
  * 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'));
     }
 }