class ValidatedInput implements ValidatedData (View source)

Properties

protected array $input

The underlying input.

Methods

void
__construct(array $input)

Create a new validated input container.

array
only(array|mixed $keys)

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

array
except(array|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

array only(array|mixed $keys)

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

Parameters

array|mixed $keys

Return Value

array

array except(array|mixed $keys)

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

Parameters

array|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

ArrayIterator getIterator()

Get an iterator for the input.

Return Value

ArrayIterator