Esempio n. 1
0
 /**
  * Give the user a single choice from an array of answers.
  *
  * @param  string  $question
  * @param  array   $choices
  * @param  string  $default
  * @param  mixed   $attempts
  * @param  bool    $multiple
  * @return bool
  */
 public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null)
 {
     $question = new ChoiceQuestion($question, $choices, $default);
     $question->setMaxAttempts($attempts)->setMultiselect($multiple);
     return $this->output->askQuestion($question);
 }