Méthode | Description | |
---|---|---|
ask ( string | array $question, string $default = null ) : string | Asks a question to the user. | |
askAndHideAnswer ( string $question, boolean $fallback = true ) : string | Asks a question to the user and hide the answer. | |
askAndValidate ( string | array $question, callable $validator, boolean | integer $attempts = false, string $default = null ) : mixed | Asks for a value and validates the response. | |
askConfirmation ( string | array $question, boolean $default = true ) : boolean | Asks a confirmation to the user. | |
askHiddenResponseAndValidate ( string | array $question, callable $validator, boolean | integer $attempts = false, boolean $fallback = true ) : mixed | Asks for a value, hide and validates the response. | |
isDebug ( ) : boolean | Is the output in debug verbosity? | |
isDecorated ( ) : boolean | Is this output decorated? | |
isInteractive ( ) : boolean | Is this input means interactive? | |
isVerbose ( ) : boolean | Is this output verbose? | |
isVeryVerbose ( ) : boolean | Is the output very verbose? | |
write ( string | array $messages, boolean $newline = true ) | Writes a message to the output. |
public askAndValidate ( string | array $question, callable $validator, boolean | integer $attempts = false, string $default = null ) : mixed | ||
$question | string | array | The question to ask |
$validator | callable | A PHP callback |
$attempts | boolean | integer | Max number of times to ask before giving up (false by default, which means infinite) |
$default | string | The default answer if none is given by the user |
Résultat | mixed |
public askHiddenResponseAndValidate ( string | array $question, callable $validator, boolean | integer $attempts = false, boolean $fallback = true ) : mixed | ||
$question | string | array | The question to ask |
$validator | callable | A PHP callback |
$attempts | boolean | integer | Max number of times to ask before giving up (false by default, which means infinite) |
$fallback | boolean | In case the response can not be hidden, whether to fallback on non-hidden question or not |
Résultat | mixed |
public isDecorated ( ) : boolean | ||
Résultat | boolean |
public isInteractive ( ) : boolean | ||
Résultat | boolean |
public isVeryVerbose ( ) : boolean | ||
Résultat | boolean |