コード例 #1
0
ファイル: index.php プロジェクト: slince/console
 function execute(Io $io, Argv $argv)
 {
     $question = new ChoiceQuestion('Whats your favorite sports', ['baskerball', 'foot ball', 'ping pang'], 0);
     $question->setMaxAttempts(3);
     $question->setMultiSelect(true);
     $answer = $this->getHelper('Question')->ask($question);
     $io->write(sprintf("You like %s", implode(', ', $answer)));
 }
コード例 #2
0
ファイル: HelpCommand.php プロジェクト: slince/console
 /**
  * (non-PHPdoc)
  * @see \Slince\Console\Command::execute()
  */
 function execute(Io $io, Argv $argv)
 {
     $commandName = $argv->getArgument('command_name');
     $command = $this->console->find($commandName);
     $io->write($this->getCommandHelp($command));
 }