platform/api/laravel/Support/ValidatedInput.yaml
2024-09-02 10:44:11 -07:00

525 lines
9.5 KiB
YAML

name: ValidatedInput
class_comment: null
dependencies:
- name: ArrayIterator
type: class
source: ArrayIterator
- name: ValidatedData
type: class
source: Illuminate\Contracts\Support\ValidatedData
- name: Date
type: class
source: Illuminate\Support\Facades\Date
- name: stdClass
type: class
source: stdClass
- name: VarDumper
type: class
source: Symfony\Component\VarDumper\VarDumper
- name: Traversable
type: class
source: Traversable
properties:
- name: input
visibility: protected
comment: '# * The underlying input.
# *
# * @var array'
methods:
- name: __construct
visibility: public
parameters:
- name: input
comment: "# * The underlying input.\n# *\n# * @var array\n# */\n# protected $input;\n\
# \n# /**\n# * Create a new validated input container.\n# *\n# * @param array\
\ $input\n# * @return void"
- name: exists
visibility: public
parameters:
- name: key
comment: '# * Determine if the validated input has one or more keys.
# *
# * @param string|array $key
# * @return bool'
- name: has
visibility: public
parameters:
- name: keys
comment: '# * Determine if the validated input has one or more keys.
# *
# * @param mixed $keys
# * @return bool'
- name: hasAny
visibility: public
parameters:
- name: keys
comment: '# * Determine if the validated input contains any of the given keys.
# *
# * @param string|array $keys
# * @return bool'
- name: whenHas
visibility: public
parameters:
- name: key
- name: callback
- name: default
default: 'null'
comment: '# * Apply the callback if the validated input contains the given input
item key.
# *
# * @param string $key
# * @param callable $callback
# * @param callable|null $default
# * @return $this|mixed'
- name: filled
visibility: public
parameters:
- name: key
comment: '# * Determine if the validated input contains a non-empty value for an
input item.
# *
# * @param string|array $key
# * @return bool'
- name: isNotFilled
visibility: public
parameters:
- name: key
comment: '# * Determine if the validated input contains an empty value for an input
item.
# *
# * @param string|array $key
# * @return bool'
- name: anyFilled
visibility: public
parameters:
- name: keys
comment: '# * Determine if the validated input contains a non-empty value for any
of the given input items.
# *
# * @param string|array $keys
# * @return bool'
- name: whenFilled
visibility: public
parameters:
- name: key
- name: callback
- name: default
default: 'null'
comment: '# * Apply the callback if the validated input contains a non-empty value
for the given input item key.
# *
# * @param string $key
# * @param callable $callback
# * @param callable|null $default
# * @return $this|mixed'
- name: isEmptyString
visibility: protected
parameters:
- name: key
comment: '# * Determine if the given input item is an empty string.
# *
# * @param string $key
# * @return bool'
- name: missing
visibility: public
parameters:
- name: keys
comment: '# * Determine if the validated input is missing one or more keys.
# *
# * @param mixed $keys
# * @return bool'
- name: whenMissing
visibility: public
parameters:
- name: key
- name: callback
- name: default
default: 'null'
comment: '# * Apply the callback if the validated input is missing the given input
item key.
# *
# * @param string $key
# * @param callable $callback
# * @param callable|null $default
# * @return $this|mixed'
- name: keys
visibility: public
parameters: []
comment: '# * Get the keys for all of the input.
# *
# * @return array'
- name: input
visibility: public
parameters:
- name: key
default: 'null'
- name: default
default: 'null'
comment: '# * Retrieve an input item from the validated input.
# *
# * @param string|null $key
# * @param mixed $default
# * @return mixed'
- name: str
visibility: public
parameters:
- name: key
- name: default
default: 'null'
comment: '# * Retrieve input from the validated input as a Stringable instance.
# *
# * @param string $key
# * @param mixed $default
# * @return \Illuminate\Support\Stringable'
- name: string
visibility: public
parameters:
- name: key
- name: default
default: 'null'
comment: '# * Retrieve input from the validated input as a Stringable instance.
# *
# * @param string $key
# * @param mixed $default
# * @return \Illuminate\Support\Stringable'
- name: boolean
visibility: public
parameters:
- name: key
default: 'null'
- name: default
default: 'false'
comment: '# * Retrieve input as a boolean value.
# *
# * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns
false.
# *
# * @param string|null $key
# * @param bool $default
# * @return bool'
- name: integer
visibility: public
parameters:
- name: key
- name: default
default: '0'
comment: '# * Retrieve input as an integer value.
# *
# * @param string $key
# * @param int $default
# * @return int'
- name: float
visibility: public
parameters:
- name: key
- name: default
default: '0.0'
comment: '# * Retrieve input as a float value.
# *
# * @param string $key
# * @param float $default
# * @return float'
- name: date
visibility: public
parameters:
- name: key
- name: format
default: 'null'
- name: tz
default: 'null'
comment: '# * Retrieve input from the validated input as a Carbon instance.
# *
# * @param string $key
# * @param string|null $format
# * @param string|null $tz
# * @return \Illuminate\Support\Carbon|null
# *
# * @throws \Carbon\Exceptions\InvalidFormatException'
- name: enum
visibility: public
parameters:
- name: key
- name: enumClass
comment: '# * Retrieve input from the validated input as an enum.
# *
# * @template TEnum
# *
# * @param string $key
# * @param class-string<TEnum> $enumClass
# * @return TEnum|null'
- name: only
visibility: public
parameters:
- name: keys
comment: '# * Get a subset containing the provided keys with values from the input
data.
# *
# * @param mixed $keys
# * @return array'
- name: except
visibility: public
parameters:
- name: keys
comment: '# * Get all of the input except for a specified array of items.
# *
# * @param mixed $keys
# * @return array'
- name: merge
visibility: public
parameters:
- name: items
comment: '# * Merge the validated input with the given array of additional data.
# *
# * @param array $items
# * @return static'
- name: collect
visibility: public
parameters:
- name: key
default: 'null'
comment: '# * Get the input as a collection.
# *
# * @param array|string|null $key
# * @return \Illuminate\Support\Collection'
- name: all
visibility: public
parameters: []
comment: '# * Get the raw, underlying input array.
# *
# * @return array'
- name: dd
visibility: public
parameters:
- name: '...$keys'
comment: '# * Dump the validated input items and end the script.
# *
# * @param mixed ...$keys
# * @return never'
- name: dump
visibility: public
parameters:
- name: keys
default: '[]'
comment: '# * Dump the items.
# *
# * @param mixed $keys
# * @return $this'
- name: toArray
visibility: public
parameters: []
comment: '# * Get the instance as an array.
# *
# * @return array'
- name: __get
visibility: public
parameters:
- name: name
comment: '# * Dynamically access input data.
# *
# * @param string $name
# * @return mixed'
- name: __set
visibility: public
parameters:
- name: name
- name: value
comment: '# * Dynamically set input data.
# *
# * @param string $name
# * @param mixed $value
# * @return mixed'
- name: __isset
visibility: public
parameters:
- name: name
comment: '# * Determine if an input item is set.
# *
# * @return bool'
- name: __unset
visibility: public
parameters:
- name: name
comment: '# * Remove an input item.
# *
# * @param string $name
# * @return void'
- name: offsetExists
visibility: public
parameters:
- name: key
comment: '# * Determine if an item exists at an offset.
# *
# * @param mixed $key
# * @return bool'
- name: offsetGet
visibility: public
parameters:
- name: key
comment: '# * Get an item at a given offset.
# *
# * @param mixed $key
# * @return mixed'
- name: offsetSet
visibility: public
parameters:
- name: key
- name: value
comment: '# * Set the item at a given offset.
# *
# * @param mixed $key
# * @param mixed $value
# * @return void'
- name: offsetUnset
visibility: public
parameters:
- name: key
comment: '# * Unset the item at a given offset.
# *
# * @param string $key
# * @return void'
- name: getIterator
visibility: public
parameters: []
comment: '# * Get an iterator for the input.
# *
# * @return \ArrayIterator'
traits:
- ArrayIterator
- Illuminate\Contracts\Support\ValidatedData
- Illuminate\Support\Facades\Date
- stdClass
- Symfony\Component\VarDumper\VarDumper
- Traversable
interfaces:
- ValidatedData