class ValidatedInput implements ValidatedData (View source)

Properties

protected array $input

The underlying input.

Methods

void
__construct(array $input)

Create a new validated input container.

bool
has(mixed $keys)

Determine if the validated input has one or more keys.

bool
missing(mixed $keys)

Determine if the validated input is missing one or more keys.

array
only(mixed $keys)

Get a subset containing the provided keys with values from the input data.

array
except(mixed $keys)

Get all of the input except for a specified array of items.

merge(array $items)

Merge the validated input with the given array of additional data.

collect()

Get the input as a collection.

array
all()

Get the raw, underlying input array.

toArray()

Get the instance as an array.

mixed
__get(string $name)

Dynamically access input data.

mixed
__set(string $name, mixed $value)

Dynamically set input data.

bool
__isset($name)

Determine if an input key is set.

void
__unset(string $name)

Remove an input key.

bool
offsetExists(mixed $key)

Determine if an item exists at an offset.

mixed
offsetGet(mixed $key)

Get an item at a given offset.

void
offsetSet(mixed $key, mixed $value)

Set the item at a given offset.

void
offsetUnset(string $key)

Unset the item at a given offset.

getIterator()

Get an iterator for the input.

Details

void __construct(array $input)

Create a new validated input container.

Parameters

array $input

Return Value

void

bool has(mixed $keys)

Determine if the validated input has one or more keys.

Parameters

mixed $keys

Return Value

bool

bool missing(mixed $keys)

Determine if the validated input is missing one or more keys.

Parameters

mixed $keys

Return Value

bool

array only(mixed $keys)

Get a subset containing the provided keys with values from the input data.

Parameters

mixed $keys

Return Value

array

array except(mixed $keys)

Get all of the input except for a specified array of items.

Parameters

mixed $keys

Return Value

array

ValidatedInput merge(array $items)

Merge the validated input with the given array of additional data.

Parameters

array $items

Return Value

ValidatedInput

Collection collect()

Get the input as a collection.

Return Value

Collection

array all()

Get the raw, underlying input array.

Return Value

array

toArray()

Get the instance as an array.

mixed __get(string $name)

Dynamically access input data.

Parameters

string $name

Return Value

mixed

mixed __set(string $name, mixed $value)

Dynamically set input data.

Parameters

string $name
mixed $value

Return Value

mixed

bool __isset($name)

Determine if an input key is set.

Parameters

$name

Return Value

bool

void __unset(string $name)

Remove an input key.

Parameters

string $name

Return Value

void

bool offsetExists(mixed $key)

Determine if an item exists at an offset.

Parameters

mixed $key

Return Value

bool

mixed offsetGet(mixed $key)

Get an item at a given offset.

Parameters

mixed $key

Return Value

mixed

void offsetSet(mixed $key, mixed $value)

Set the item at a given offset.

Parameters

mixed $key
mixed $value

Return Value

void

void offsetUnset(string $key)

Unset the item at a given offset.

Parameters

string $key

Return Value

void

Traversable getIterator()

Get an iterator for the input.

Return Value

Traversable