示例#1
0
 /**
  * Dispatches a command.
  *
  * @access  protected
  * @param   string     $command  Command
  */
 protected function dispatch($command)
 {
     if (!isset($this->commands[$command])) {
         $this->output->writeLn('<red>Unknown command [ ' . $command . ' ].</red>');
         $this->output->write(PHP_EOL);
         $this->listCommands();
         return;
     }
     $this->dispatcher->dispatch($this->commands[$command], $this->input->getArguments());
 }
示例#2
0
 /**
  * Writes string to output.
  *
  * @access  protected
  * @param   string     $string  String to write
  * @param   int        $writer  Output writer
  */
 protected function write($string, $writer = Output::STANDARD)
 {
     $this->output->writeLn($string, $writer);
 }