109 lines
2.2 KiB
YAML
109 lines
2.2 KiB
YAML
|
name: InputBag
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: BadRequestException
|
||
|
type: class
|
||
|
source: Symfony\Component\HttpFoundation\Exception\BadRequestException
|
||
|
- name: UnexpectedValueException
|
||
|
type: class
|
||
|
source: Symfony\Component\HttpFoundation\Exception\UnexpectedValueException
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: get
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: key
|
||
|
- name: default
|
||
|
default: 'null'
|
||
|
comment: '# * InputBag is a container for user input values such as $_GET, $_POST,
|
||
|
$_REQUEST, and $_COOKIE.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @author Saif Eddin Gmati <azjezz@protonmail.com>
|
||
|
|
||
|
# */
|
||
|
|
||
|
# final class InputBag extends ParameterBag
|
||
|
|
||
|
# {
|
||
|
|
||
|
# /**
|
||
|
|
||
|
# * Returns a scalar input value by name.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|int|float|bool|null $default The default value if the input
|
||
|
key does not exist'
|
||
|
- name: replace
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: inputs
|
||
|
default: '[]'
|
||
|
comment: '# * Replaces the current input values by a new set.'
|
||
|
- name: add
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: inputs
|
||
|
default: '[]'
|
||
|
comment: '# * Adds input values.'
|
||
|
- name: set
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: key
|
||
|
- name: value
|
||
|
comment: '# * Sets an input by name.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|int|float|bool|array|null $value'
|
||
|
- name: getEnum
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: key
|
||
|
- name: class
|
||
|
- name: default
|
||
|
default: 'null'
|
||
|
comment: '# * Returns the parameter value converted to an enum.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @template T of \BackedEnum
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param class-string<T> $class
|
||
|
|
||
|
# * @param ?T $default
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return ?T
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @psalm-return ($default is null ? T|null : T)'
|
||
|
- name: getString
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: key
|
||
|
- name: default
|
||
|
default: ''''''
|
||
|
comment: '# * Returns the parameter value converted to string.'
|
||
|
- name: filter
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: key
|
||
|
- name: default
|
||
|
default: 'null'
|
||
|
- name: filter
|
||
|
default: \FILTER_DEFAULT
|
||
|
- name: options
|
||
|
default: '[]'
|
||
|
comment: null
|
||
|
traits:
|
||
|
- Symfony\Component\HttpFoundation\Exception\BadRequestException
|
||
|
- Symfony\Component\HttpFoundation\Exception\UnexpectedValueException
|
||
|
interfaces: []
|