Question
class Question
Represents a Question.
Methods
No description
Returns the question.
Returns the default answer.
Returns whether the user response must be hidden.
Sets whether the user response must be hidden or not.
In case the response can not be hidden, whether to fallback on non-hidden question or not.
Sets whether to fallback on non-hidden question if the response can not be hidden.
Gets values for the autocompleter.
Sets values for the autocompleter.
Sets a validator for the question.
Gets the validator for the question.
Sets the maximum number of attempts.
Gets the maximum number of attempts.
Sets a normalizer for the response.
Gets the normalizer for the response.
No description
Details
bool
isHiddenFallback()
In case the response can not be hidden, whether to fallback on non-hidden question or not.
$this
setHiddenFallback(bool $fallback)
Sets whether to fallback on non-hidden question if the response can not be hidden.
$this
setMaxAttempts(int|null $attempts)
Sets the maximum number of attempts.
Null means an unlimited number of attempts.
int|null
getMaxAttempts()
Gets the maximum number of attempts.
Null means an unlimited number of attempts.
$this
setNormalizer(callable $normalizer)
Sets a normalizer for the response.
The normalizer can be a callable (a string), a closure or a class implementing __invoke.