Methods summary
public
|
#
__construct( string $question, mixed $default = null )
Constructor.
Parameters
- $question
- The question to ask to the user
- $default
- The default answer to return if the user enters nothing
|
public
string
|
|
public
mixed
|
#
getDefault( )
Returns the default answer.
Returns the default answer.
Returns
mixed
|
public
boolean
|
#
isHidden( )
Returns whether the user response must be hidden.
Returns whether the user response must be hidden.
Returns
boolean
|
public
Symfony\Component\Console\Question\Question
|
#
setHidden( boolean $hidden )
Sets whether the user response must be hidden or not.
Sets whether the user response must be hidden or not.
Parameters
Returns
Throws
|
public
boolean
|
#
isHiddenFallback( )
In case the response can not be hidden, whether to fallback on non-hidden question or not.
In case the response can not be hidden, whether to fallback on non-hidden question or not.
Returns
boolean
|
public
Symfony\Component\Console\Question\Question
|
#
setHiddenFallback( boolean $fallback )
Sets whether to fallback on non-hidden question if the response can not be hidden.
Sets whether to fallback on non-hidden question if the response can not be hidden.
Parameters
Returns
|
public
null|array|Traversable
|
#
getAutocompleterValues( )
Gets values for the autocompleter.
Gets values for the autocompleter.
Returns
null|array|Traversable
|
public
Symfony\Component\Console\Question\Question
|
#
setAutocompleterValues( null|array|Traversable $values )
Sets values for the autocompleter.
Sets values for the autocompleter.
Parameters
Returns
Throws
|
public
Symfony\Component\Console\Question\Question
|
#
setValidator( null|callable $validator )
Sets a validator for the question.
Sets a validator for the question.
Parameters
Returns
|
public
null|callable
|
#
getValidator( )
Gets the validator for the question.
Gets the validator for the question.
Returns
null|callable
|
public
Symfony\Component\Console\Question\Question
|
#
setMaxAttempts( null|integer $attempts )
Sets the maximum number of attempts.
Sets the maximum number of attempts.
Null means an unlimited number of attempts.
Parameters
Returns
Throws
|
public
null|integer
|
#
getMaxAttempts( )
Gets the maximum number of attempts.
Gets the maximum number of attempts.
Null means an unlimited number of attempts.
Returns
null|integer
|
public
Symfony\Component\Console\Question\Question
|
#
setNormalizer( callable $normalizer )
Sets a normalizer for the response.
Sets a normalizer for the response.
The normalizer can be a callable (a string), a closure or a class implementing __invoke.
Parameters
Returns
|
public
callable
|
#
getNormalizer( )
Gets the normalizer for the response.
Gets the normalizer for the response.
The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
Returns
callable
|
protected
|
|