class DialogHelper extends InputAwareHelper
deprecated
The Dialog class provides helpers to interact with the user.
setHelperSet(HelperSet $helperSet = null) Sets the helper set associated with this helper. | from Helper | |
HelperSet | getHelperSet() Gets the helper set associated with this helper. | from Helper |
static int | strlen(string $string) Returns the length of a string, using mb_strwidth if it is available. | from Helper |
static | formatTime($secs) | from Helper |
static | formatMemory($memory) | from Helper |
static | strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) | from Helper |
setInput(InputInterface $input) Sets the Console Input. | from InputAwareHelper | |
__construct($triggerDeprecationError = true) | ||
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. | |
string | ask(OutputInterface $output, string|array $question, string $default = null, array $autocomplete = null) Asks a question to the user. | |
bool | askConfirmation(OutputInterface $output, string|array $question, bool $default = true) Asks a confirmation to the user. | |
string | askHiddenResponse(OutputInterface $output, string|array $question, bool $fallback = true) Asks a question to the user, the response is hidden. | |
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. | |
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. | |
setInputStream(resource $stream) Sets the input stream to read from when interacting with the user. | ||
resource|null | getInputStream() Returns the helper's input stream. | |
string | getName() Returns the canonical name of this helper. |
Sets the helper set associated with this helper.
Gets the helper set associated with this helper.
Returns the length of a string, using mb_strwidth if it is available.
Sets the Console Input.
Asks the user to select a value.
Asks a question to the user.
Asks a confirmation to the user.
The question will be asked until the user answers by nothing, yes, or no.
Asks a question to the user, the response is hidden.
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.
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.
Sets the input stream to read from when interacting with the user.
This is mainly useful for testing purpose.
Returns the helper's input stream.
Returns the canonical name of this helper.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.1/Symfony/Component/Console/Helper/DialogHelper.html