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

196 lines
4.8 KiB
YAML

name: Question
class_comment: '# * Represents a Question.
# *
# * @author Fabien Potencier <fabien@symfony.com>'
dependencies:
- name: InvalidArgumentException
type: class
source: Symfony\Component\Console\Exception\InvalidArgumentException
- name: LogicException
type: class
source: Symfony\Component\Console\Exception\LogicException
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: question
- name: default
default: 'null'
comment: "# * Represents a Question.\n# *\n# * @author Fabien Potencier <fabien@symfony.com>\n\
# */\n# class Question\n# {\n# private ?int $attempts = null;\n# private bool\
\ $hidden = false;\n# private bool $hiddenFallback = true;\n# private ?\\Closure\
\ $autocompleterCallback = null;\n# private ?\\Closure $validator = null;\n# private\
\ ?\\Closure $normalizer = null;\n# private bool $trimmable = true;\n# private\
\ bool $multiline = false;\n# \n# /**\n# * @param string $question\
\ The question to ask to the user\n# * @param string|bool|int|float|null $default\
\ The default answer to return if the user enters nothing"
- name: getQuestion
visibility: public
parameters: []
comment: '# * Returns the question.'
- name: getDefault
visibility: public
parameters: []
comment: '# * Returns the default answer.'
- name: isMultiline
visibility: public
parameters: []
comment: '# * Returns whether the user response accepts newline characters.'
- name: setMultiline
visibility: public
parameters:
- name: multiline
comment: '# * Sets whether the user response should accept newline characters.
# *
# * @return $this'
- name: isHidden
visibility: public
parameters: []
comment: '# * Returns whether the user response must be hidden.'
- name: setHidden
visibility: public
parameters:
- name: hidden
comment: '# * Sets whether the user response must be hidden or not.
# *
# * @return $this
# *
# * @throws LogicException In case the autocompleter is also used'
- name: isHiddenFallback
visibility: public
parameters: []
comment: '# * In case the response cannot be hidden, whether to fallback on non-hidden
question or not.'
- name: setHiddenFallback
visibility: public
parameters:
- name: fallback
comment: '# * Sets whether to fallback on non-hidden question if the response cannot
be hidden.
# *
# * @return $this'
- name: getAutocompleterValues
visibility: public
parameters: []
comment: '# * Gets values for the autocompleter.'
- name: setAutocompleterValues
visibility: public
parameters:
- name: values
comment: '# * Sets values for the autocompleter.
# *
# * @return $this
# *
# * @throws LogicException'
- name: getAutocompleterCallback
visibility: public
parameters: []
comment: '# * Gets the callback function used for the autocompleter.'
- name: setAutocompleterCallback
visibility: public
parameters:
- name: callback
comment: '# * Sets the callback function used for the autocompleter.
# *
# * The callback is passed the user input as argument and should return an iterable
of corresponding suggestions.
# *
# * @return $this'
- name: setValidator
visibility: public
parameters:
- name: validator
comment: '# * Sets a validator for the question.
# *
# * @return $this'
- name: getValidator
visibility: public
parameters: []
comment: '# * Gets the validator for the question.'
- name: setMaxAttempts
visibility: public
parameters:
- name: attempts
comment: '# * Sets the maximum number of attempts.
# *
# * Null means an unlimited number of attempts.
# *
# * @return $this
# *
# * @throws InvalidArgumentException in case the number of attempts is invalid'
- name: getMaxAttempts
visibility: public
parameters: []
comment: '# * Gets the maximum number of attempts.
# *
# * Null means an unlimited number of attempts.'
- name: setNormalizer
visibility: public
parameters:
- name: normalizer
comment: '# * Sets a normalizer for the response.
# *
# * The normalizer can be a callable (a string), a closure or a class implementing
__invoke.
# *
# * @return $this'
- name: getNormalizer
visibility: public
parameters: []
comment: '# * Gets the normalizer for the response.
# *
# * The normalizer can ba a callable (a string), a closure or a class implementing
__invoke.'
- name: isAssoc
visibility: protected
parameters:
- name: array
comment: null
- name: isTrimmable
visibility: public
parameters: []
comment: null
- name: setTrimmable
visibility: public
parameters:
- name: trimmable
comment: '# * @return $this'
traits:
- Symfony\Component\Console\Exception\InvalidArgumentException
- Symfony\Component\Console\Exception\LogicException
interfaces: []