| Methods |
public
|
ask(InputInterface $input, OutputInterface $output, Question $question): mixed
Asks a question to the user.
Asks a question to the user.
Returns
Throws
|
#
|
public
|
getName(): string
Returns the canonical name of this helper.
Returns the canonical name of this helper.
Implements
|
#
|
public
static
|
disableStty(): void
Prevents usage of stty.
|
#
|
private
|
doAsk(OutputInterface $output, Question $question): mixed
Asks the question to the user.
Asks the question to the user.
Throws
|
#
|
private
|
getDefaultAnswer(Question $question): mixed
|
#
|
protected
|
writePrompt(OutputInterface $output, Question $question): void
Outputs the question prompt.
Outputs the question prompt.
Overriden by
|
#
|
protected
|
formatChoiceQuestionChoices(ChoiceQuestion $question, string $tag): string[]
|
#
|
protected
|
writeError(OutputInterface $output, Exception $error): void
Outputs an error message.
Outputs an error message.
Overriden by
|
#
|
private
|
autocomplete(OutputInterface $output, Question $question, resource $inputStream, callable $autocomplete): string
Autocompletes a question.
Autocompletes a question.
|
#
|
private
|
mostRecentlyEnteredValue(string $entered): string
|
#
|
private
|
getHiddenResponse(OutputInterface $output, resource $inputStream, bool $trimmable = true): string
Gets a hidden response from user.
Gets a hidden response from user.
Parameters
| $inputStream |
The handler resource
|
| $trimmable |
Is the answer trimmable
|
Throws
|
#
|
private
|
validateAttempts(callable $interviewer, OutputInterface $output, Question $question): mixed
Validates an attempt.
Parameters
| $interviewer |
A callable that will ask for a question and return the result
|
Throws
Exception |
In case the max number of attempts has been reached and no valid response has been given
|
|
#
|
private
|
isInteractiveInput($inputStream): bool
|
#
|
private
|
readInput(resource $inputStream, Question $question): string|false
Reads one or more lines of input and returns what is read.
Reads one or more lines of input and returns what is read.
Parameters
| $inputStream |
The handler resource
|
| $question |
The question being asked
|
|
#
|
private
|
setIOCodepage(): int
|
#
|
private
|
resetIOCodepage(int $cp, string|false $input): string|false
Sets console I/O to the specified code page and converts the user input.
Sets console I/O to the specified code page and converts the user input.
|
#
|
private
|
cloneInputStream(resource $inputStream): resource|null
Clones an input stream in order to act on one instance of the same
stream without affecting the other instance.
Clones an input stream in order to act on one instance of the same
stream without affecting the other instance.
Parameters
| $inputStream |
The handler resource
|
Returns
The cloned resource, null in case it could not be cloned
|
#
|