public function ChoiceQuestion::__construct in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/console/Question/ChoiceQuestion.php \Symfony\Component\Console\Question\ChoiceQuestion::__construct()
Constructor.
Parameters
string $question The question to ask to the user:
array $choices The list of available choices:
mixed $default The default answer to return:
Overrides Question::__construct
File
- vendor/
symfony/ console/ Question/ ChoiceQuestion.php, line 33
Class
- ChoiceQuestion
- Represents a choice question.
Namespace
Symfony\Component\Console\QuestionCode
public function __construct($question, array $choices, $default = null) {
parent::__construct($question, $default);
$this->choices = $choices;
$this
->setValidator($this
->getDefaultValidator());
$this
->setAutocompleterValues($choices);
}