class SymfonyQuestionHelper extends QuestionHelper
Symfony Style Guide compliant question helper.
protected | $helperSet | from Helper |
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 string | substr(string $string, int $from, int|null $length = null) Returns the subset of a string, using mb_substr if it is available. | from Helper |
static | formatTime($secs) | from Helper |
static | formatMemory($memory) | from Helper |
static | strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) | from Helper |
static | removeDecoration(OutputFormatterInterface $formatter, $string) | from Helper |
mixed | ask(InputInterface $input, OutputInterface $output, Question $question) Asks a question to the user. | from QuestionHelper |
string | getName() Returns the canonical name of this helper. | from QuestionHelper |
static | disableStty() Prevents usage of stty. | from QuestionHelper |
writePrompt(OutputInterface $output, Question $question) Outputs the question prompt. | ||
writeError(OutputInterface $output, Exception $error) Outputs an error message. |
Sets the helper set associated with this helper.
HelperSet | $helperSet |
Gets the helper set associated with this helper.
HelperSet | A HelperSet instance |
Returns the length of a string, using mb_strwidth if it is available.
string | $string | The string to check its length |
int | The length of the string |
Returns the subset of a string, using mb_substr if it is available.
string | $string | String to subset |
int | $from | Start offset |
int|null | $length | Length to read |
string | The string subset |
$secs |
$memory |
OutputFormatterInterface | $formatter | |
$string |
OutputFormatterInterface | $formatter | |
$string |
Asks a question to the user.
InputInterface | $input | |
OutputInterface | $output | |
Question | $question |
mixed | The user answer |
RuntimeException | If there is no data to read in the input stream |
Returns the canonical name of this helper.
string | The canonical name |
Prevents usage of stty.
Outputs the question prompt.
OutputInterface | $output | |
Question | $question |
Outputs an error message.
OutputInterface | $output | |
Exception | $error |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Console/Helper/SymfonyQuestionHelper.html