DialogHelper deprecated
class DialogHelper extends InputAwareHelper
deprecated
The Dialog class provides helpers to interact with the user.
Methods
Returns the length of a string, using mb_strwidth if it is available.
No description
Asks the user to select a value.
Asks a question to the user.
Asks a confirmation to the user.
Asks a question to the user, the response is hidden.
Asks for a value and validates the response.
Asks for a value, hide and validates the response.
Sets the input stream to read from when interacting with the user.
Returns the helper's input stream.
Returns the canonical name of this helper.
Details
in Helper at line line 30
setHelperSet(HelperSet $helperSet = null)
Sets the helper set associated with this helper.
in Helper at line line 52
static int
strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
in Helper at line line 61
static
formatTime($secs)
in Helper at line line 88
static
formatMemory($memory)
in Helper at line line 105
static
strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
in InputAwareHelper at line line 29
setInput(InputInterface $input)
Sets the Console Input.
at line line 33
__construct($triggerDeprecationError = true)
at line line 55
int|string|array
select(OutputInterface $output, string|array $question, array $choices, bool|string $default = null, bool|int $attempts = false, string $errorMessage = 'Value "%s" is invalid', bool $multiselect = false)
Asks the user to select a value.
at line line 111
string
ask(OutputInterface $output, string|array $question, string $default = null, array $autocomplete = null)
Asks a question to the user.
at line line 247
bool
askConfirmation(OutputInterface $output, string|array $question, bool $default = true)
Asks a confirmation to the user.
The question will be asked until the user answers by nothing, yes, or no.
at line line 272
string
askHiddenResponse(OutputInterface $output, string|array $question, bool $fallback = true)
Asks a question to the user, the response is hidden.
at line line 349
mixed
askAndValidate(OutputInterface $output, string|array $question, callable $validator, int|false $attempts = false, string $default = null, array $autocomplete = null)
Asks for a value and validates the response.
The validator receives the data to validate. It must return the validated data when the data is valid and throw an exception otherwise.
at line line 378
string
askHiddenResponseAndValidate(OutputInterface $output, string|array $question, callable $validator, int|false $attempts = false, bool $fallback = true)
Asks for a value, hide and validates the response.
The validator receives the data to validate. It must return the validated data when the data is valid and throw an exception otherwise.
at line line 396
setInputStream(resource $stream)
Sets the input stream to read from when interacting with the user.
This is mainly useful for testing purpose.
at line line 406
resource|null
getInputStream()
Returns the helper's input stream.
at line line 414
string
getName()
Returns the canonical name of this helper.