Class Symfony\Component\Console\Question\ConfirmationQuestion

InheritanceSymfony\Component\Console\Question\ConfirmationQuestion » Symfony\Component\Console\Question\Question

Represents a yes/no question.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Constructor. Symfony\Component\Console\Question\ConfirmationQuestion
getAutocompleterValues() Gets values for the autocompleter. Symfony\Component\Console\Question\Question
getDefault() Returns the default answer. Symfony\Component\Console\Question\Question
getMaxAttempts() Gets the maximum number of attempts. Symfony\Component\Console\Question\Question
getNormalizer() Gets the normalizer for the response. Symfony\Component\Console\Question\Question
getQuestion() Returns the question. Symfony\Component\Console\Question\Question
getValidator() Gets the validator for the question. Symfony\Component\Console\Question\Question
isHidden() Returns whether the user response must be hidden. Symfony\Component\Console\Question\Question
isHiddenFallback() In case the response can not be hidden, whether to fallback on non-hidden question or not. Symfony\Component\Console\Question\Question
setAutocompleterValues() Sets values for the autocompleter. Symfony\Component\Console\Question\Question
setHidden() Sets whether the user response must be hidden or not. Symfony\Component\Console\Question\Question
setHiddenFallback() Sets whether to fallback on non-hidden question if the response can not be hidden. Symfony\Component\Console\Question\Question
setMaxAttempts() Sets the maximum number of attempts. Symfony\Component\Console\Question\Question
setNormalizer() Sets a normalizer for the response. Symfony\Component\Console\Question\Question
setValidator() Sets a validator for the question. Symfony\Component\Console\Question\Question

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
isAssoc() Symfony\Component\Console\Question\Question

Method Details

__construct() public method

Constructor.

public void __construct ( $question, $default true, $trueAnswerRegex '/^y/i' )
$question string

The question to ask to the user

$default bool

The default answer to return, true or false

$trueAnswerRegex string

A regex to match the "yes" answer