api/symfony/Component/Console/Input/InputInterface.yaml
2024-09-26 02:03:21 -07:00

187 lines
4.8 KiB
YAML

name: InputInterface
class_comment: null
dependencies:
- name: InvalidArgumentException
type: class
source: Symfony\Component\Console\Exception\InvalidArgumentException
- name: RuntimeException
type: class
source: Symfony\Component\Console\Exception\RuntimeException
properties: []
methods:
- name: getFirstArgument
visibility: public
parameters: []
comment: '# * InputInterface is the interface implemented by all input classes.
# *
# * @author Fabien Potencier <fabien@symfony.com>
# */
# interface InputInterface
# {
# /**
# * Returns the first argument from the raw parameters (not parsed).'
- name: hasParameterOption
visibility: public
parameters:
- name: values
- name: onlyParams
default: 'false'
comment: '# * Returns true if the raw parameters (not parsed) contain a value.
# *
# * This method is to be used to introspect the input parameters
# * before they have been validated. It must be used carefully.
# * Does not necessarily return the correct result for short options
# * when multiple flags are combined in the same option.
# *
# * @param string|array $values The values to look for in the raw parameters
(can be an array)
# * @param bool $onlyParams Only check real parameters, skip those following
an end of options (--) signal'
- name: getParameterOption
visibility: public
parameters:
- name: values
- name: default
default: 'false'
- name: onlyParams
default: 'false'
comment: '# * Returns the value of a raw option (not parsed).
# *
# * This method is to be used to introspect the input parameters
# * before they have been validated. It must be used carefully.
# * Does not necessarily return the correct result for short options
# * when multiple flags are combined in the same option.
# *
# * @param string|array $values The value(s) to look for
in the raw parameters (can be an array)
# * @param string|bool|int|float|array|null $default The default value to return
if no result is found
# * @param bool $onlyParams Only check real parameters,
skip those following an end of options (--) signal'
- name: bind
visibility: public
parameters:
- name: definition
comment: '# * Binds the current Input instance with the given arguments and options.
# *
# * @throws RuntimeException'
- name: validate
visibility: public
parameters: []
comment: '# * Validates the input.
# *
# * @throws RuntimeException When not enough arguments are given'
- name: getArguments
visibility: public
parameters: []
comment: '# * Returns all the given arguments merged with the default values.
# *
# * @return array<string|bool|int|float|array|null>'
- name: getArgument
visibility: public
parameters:
- name: name
comment: '# * Returns the argument value for a given argument name.
# *
# * @throws InvalidArgumentException When argument given doesn''t exist'
- name: setArgument
visibility: public
parameters:
- name: name
- name: value
comment: '# * Sets an argument value by name.
# *
# * @throws InvalidArgumentException When argument given doesn''t exist'
- name: hasArgument
visibility: public
parameters:
- name: name
comment: '# * Returns true if an InputArgument object exists by name or position.'
- name: getOptions
visibility: public
parameters: []
comment: '# * Returns all the given options merged with the default values.
# *
# * @return array<string|bool|int|float|array|null>'
- name: getOption
visibility: public
parameters:
- name: name
comment: '# * Returns the option value for a given option name.
# *
# * @throws InvalidArgumentException When option given doesn''t exist'
- name: setOption
visibility: public
parameters:
- name: name
- name: value
comment: '# * Sets an option value by name.
# *
# * @throws InvalidArgumentException When option given doesn''t exist'
- name: hasOption
visibility: public
parameters:
- name: name
comment: '# * Returns true if an InputOption object exists by name.'
- name: isInteractive
visibility: public
parameters: []
comment: '# * Is this input means interactive?'
- name: setInteractive
visibility: public
parameters:
- name: interactive
comment: '# * Sets the input interactivity.'
- name: __toString
visibility: public
parameters: []
comment: '# * Returns a stringified representation of the args passed to the command.
# *
# * InputArguments MUST be escaped as well as the InputOption values passed to
the command.'
traits:
- Symfony\Component\Console\Exception\InvalidArgumentException
- Symfony\Component\Console\Exception\RuntimeException
interfaces: []