platform/api/symfony/Component/Console/Helper/QuestionHelper.yaml
2024-09-02 10:44:11 -07:00

219 lines
5.8 KiB
YAML

name: QuestionHelper
class_comment: '# * The QuestionHelper class provides helpers to interact with the
user.
# *
# * @author Fabien Potencier <fabien@symfony.com>'
dependencies:
- name: Cursor
type: class
source: Symfony\Component\Console\Cursor
- name: MissingInputException
type: class
source: Symfony\Component\Console\Exception\MissingInputException
- name: RuntimeException
type: class
source: Symfony\Component\Console\Exception\RuntimeException
- name: OutputFormatter
type: class
source: Symfony\Component\Console\Formatter\OutputFormatter
- name: OutputFormatterStyle
type: class
source: Symfony\Component\Console\Formatter\OutputFormatterStyle
- name: InputInterface
type: class
source: Symfony\Component\Console\Input\InputInterface
- name: StreamableInputInterface
type: class
source: Symfony\Component\Console\Input\StreamableInputInterface
- name: ConsoleOutputInterface
type: class
source: Symfony\Component\Console\Output\ConsoleOutputInterface
- name: ConsoleSectionOutput
type: class
source: Symfony\Component\Console\Output\ConsoleSectionOutput
- name: OutputInterface
type: class
source: Symfony\Component\Console\Output\OutputInterface
- name: ChoiceQuestion
type: class
source: Symfony\Component\Console\Question\ChoiceQuestion
- name: Question
type: class
source: Symfony\Component\Console\Question\Question
- name: Terminal
type: class
source: Symfony\Component\Console\Terminal
properties: []
methods:
- name: ask
visibility: public
parameters:
- name: input
- name: output
- name: question
comment: "# * The QuestionHelper class provides helpers to interact with the user.\n\
# *\n# * @author Fabien Potencier <fabien@symfony.com>\n# */\n# class QuestionHelper\
\ extends Helper\n# {\n# private static bool $stty = true;\n# private static bool\
\ $stdinIsInteractive;\n# \n# /**\n# * Asks a question to the user.\n# *\n# *\
\ @return mixed The user answer\n# *\n# * @throws RuntimeException If there is\
\ no data to read in the input stream"
- name: getName
visibility: public
parameters: []
comment: null
- name: disableStty
visibility: public
parameters: []
comment: '# * Prevents usage of stty.'
- name: doAsk
visibility: private
parameters:
- name: inputStream
- name: output
- name: question
comment: '# * Asks the question to the user.
# *
# * @param resource $inputStream
# *
# * @throws RuntimeException In case the fallback is deactivated and the response
cannot be hidden'
- name: getDefaultAnswer
visibility: private
parameters:
- name: question
comment: null
- name: writePrompt
visibility: protected
parameters:
- name: output
- name: question
comment: '# * Outputs the question prompt.'
- name: formatChoiceQuestionChoices
visibility: protected
parameters:
- name: question
- name: tag
comment: '# * @return string[]'
- name: writeError
visibility: protected
parameters:
- name: output
- name: error
comment: '# * Outputs an error message.'
- name: autocomplete
visibility: private
parameters:
- name: output
- name: question
- name: inputStream
- name: autocomplete
comment: '# * Autocompletes a question.
# *
# * @param resource $inputStream'
- name: mostRecentlyEnteredValue
visibility: private
parameters:
- name: entered
comment: null
- name: getHiddenResponse
visibility: private
parameters:
- name: output
- name: inputStream
- name: trimmable
default: 'true'
comment: '# * Gets a hidden response from user.
# *
# * @param resource $inputStream The handler resource
# * @param bool $trimmable Is the answer trimmable
# *
# * @throws RuntimeException In case the fallback is deactivated and the response
cannot be hidden'
- name: validateAttempts
visibility: private
parameters:
- name: interviewer
- name: output
- name: question
comment: '# * Validates an attempt.
# *
# * @param callable $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'
- name: isInteractiveInput
visibility: private
parameters:
- name: inputStream
comment: null
- name: readInput
visibility: private
parameters:
- name: inputStream
- name: question
comment: '# * Reads one or more lines of input and returns what is read.
# *
# * @param resource $inputStream The handler resource
# * @param Question $question The question being asked'
- name: setIOCodepage
visibility: private
parameters: []
comment: null
- name: resetIOCodepage
visibility: private
parameters:
- name: cp
- name: input
comment: '# * Sets console I/O to the specified code page and converts the user
input.'
- name: cloneInputStream
visibility: private
parameters:
- name: inputStream
comment: '# * Clones an input stream in order to act on one instance of the same
# * stream without affecting the other instance.
# *
# * @param resource $inputStream The handler resource
# *
# * @return resource|null The cloned resource, null in case it could not be cloned'
traits:
- Symfony\Component\Console\Cursor
- Symfony\Component\Console\Exception\MissingInputException
- Symfony\Component\Console\Exception\RuntimeException
- Symfony\Component\Console\Formatter\OutputFormatter
- Symfony\Component\Console\Formatter\OutputFormatterStyle
- Symfony\Component\Console\Input\InputInterface
- Symfony\Component\Console\Input\StreamableInputInterface
- Symfony\Component\Console\Output\ConsoleOutputInterface
- Symfony\Component\Console\Output\ConsoleSectionOutput
- Symfony\Component\Console\Output\OutputInterface
- Symfony\Component\Console\Question\ChoiceQuestion
- Symfony\Component\Console\Question\Question
- Symfony\Component\Console\Terminal
interfaces: []