TYPO3
7.6
|
Public Member Functions | |
__construct ($question, $default=null) | |
getQuestion () | |
getDefault () | |
isHidden () | |
setHidden ($hidden) | |
isHiddenFallback () | |
setHiddenFallback ($fallback) | |
getAutocompleterValues () | |
setAutocompleterValues ($values) | |
setValidator ($validator) | |
getValidator () | |
setMaxAttempts ($attempts) | |
getMaxAttempts () | |
setNormalizer ($normalizer) | |
getNormalizer () | |
Protected Member Functions | |
isAssoc ($array) | |
Private Attributes | |
$question | |
$attempts | |
$hidden = false | |
$hiddenFallback = true | |
$autocompleterValues | |
$validator | |
$default | |
$normalizer | |
Represents a Question.
Definition at line 19 of file Question.php.
__construct | ( | $question, | |
$default = null |
|||
) |
Constructor.
string | $question | The question to ask to the user |
mixed | $default | The default answer to return if the user enters nothing |
Definition at line 36 of file Question.php.
References Question\$default, and Question\$question.
getAutocompleterValues | ( | ) |
Gets values for the autocompleter.
Definition at line 121 of file Question.php.
References Question\$autocompleterValues.
Referenced by QuestionHelper\autocomplete(), and QuestionHelper\doAsk().
getDefault | ( | ) |
Returns the default answer.
Definition at line 57 of file Question.php.
References Question\$default.
Referenced by QuestionHelper\ask(), QuestionHelper\doAsk(), ConfirmationQuestion\getDefaultNormalizer(), and SymfonyQuestionHelper\writePrompt().
getMaxAttempts | ( | ) |
Gets the maximum number of attempts.
Null means an unlimited number of attempts.
Definition at line 210 of file Question.php.
References Question\$attempts.
Referenced by QuestionHelper\validateAttempts().
getNormalizer | ( | ) |
Gets the normalizer for the response.
The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
Definition at line 238 of file Question.php.
References Question\$normalizer.
Referenced by QuestionHelper\doAsk().
getQuestion | ( | ) |
Returns the question.
Definition at line 47 of file Question.php.
References Question\$question.
Referenced by SymfonyQuestionHelper\writePrompt(), and QuestionHelper\writePrompt().
getValidator | ( | ) |
Gets the validator for the question.
Definition at line 176 of file Question.php.
References Question\$validator.
Referenced by SymfonyQuestionHelper\ask(), QuestionHelper\ask(), and QuestionHelper\validateAttempts().
|
protected |
Definition at line 243 of file Question.php.
Referenced by ChoiceQuestion\getDefaultValidator(), and Question\setAutocompleterValues().
isHidden | ( | ) |
Returns whether the user response must be hidden.
Definition at line 67 of file Question.php.
References Question\$hidden.
Referenced by QuestionHelper\doAsk().
isHiddenFallback | ( | ) |
In case the response can not be hidden, whether to fallback on non-hidden question or not.
Definition at line 97 of file Question.php.
References Question\$hiddenFallback.
Referenced by QuestionHelper\doAsk().
setAutocompleterValues | ( | $values | ) |
Sets values for the autocompleter.
null | array | \Traversable | $values |
\InvalidArgumentException | |
\LogicException |
Definition at line 136 of file Question.php.
References Question\isAssoc().
Referenced by ChoiceQuestion\__construct().
setHidden | ( | $hidden | ) |
Sets whether the user response must be hidden or not.
bool | $hidden |
\LogicException | In case the autocompleter is also used |
Definition at line 81 of file Question.php.
References Question\$hidden.
setHiddenFallback | ( | $fallback | ) |
Sets whether to fallback on non-hidden question if the response can not be hidden.
bool | $fallback |
Definition at line 109 of file Question.php.
setMaxAttempts | ( | $attempts | ) |
Sets the maximum number of attempts.
Null means an unlimited number of attempts.
null | int | $attempts |
\InvalidArgumentException | In case the number of attempts is invalid. |
Definition at line 192 of file Question.php.
References Question\$attempts.
setNormalizer | ( | $normalizer | ) |
Sets a normalizer for the response.
The normalizer can be a callable (a string), a closure or a class implementing __invoke.
string | \Closure | $normalizer |
Definition at line 224 of file Question.php.
References Question\$normalizer.
Referenced by ConfirmationQuestion\__construct().
setValidator | ( | $validator | ) |
Sets a validator for the question.
null | callable | $validator |
Definition at line 164 of file Question.php.
References Question\$validator.
Referenced by ChoiceQuestion\__construct(), SymfonyQuestionHelper\ask(), ChoiceQuestion\setErrorMessage(), and ChoiceQuestion\setMultiselect().
|
private |
Definition at line 22 of file Question.php.
Referenced by Question\getMaxAttempts(), and Question\setMaxAttempts().
|
private |
Definition at line 25 of file Question.php.
Referenced by Question\getAutocompleterValues().
|
private |
Definition at line 27 of file Question.php.
Referenced by ConfirmationQuestion\__construct(), ChoiceQuestion\__construct(), Question\__construct(), Question\getDefault(), and ConfirmationQuestion\getDefaultNormalizer().
|
private |
Definition at line 23 of file Question.php.
Referenced by Question\isHidden(), and Question\setHidden().
|
private |
Definition at line 24 of file Question.php.
Referenced by Question\isHiddenFallback().
|
private |
Definition at line 28 of file Question.php.
Referenced by Question\getNormalizer(), and Question\setNormalizer().
|
private |
Definition at line 21 of file Question.php.
Referenced by ConfirmationQuestion\__construct(), ChoiceQuestion\__construct(), Question\__construct(), and Question\getQuestion().
|
private |
Definition at line 26 of file Question.php.
Referenced by Question\getValidator(), and Question\setValidator().