class Only extends ArrayMutator (View source)

Retrieve only the keys specified.

Methods

__construct(array|string $keys)

No description

mixed
__invoke(mixed $value)

Mutate the input value.

from  Mutator
static Only
make(array|string $keys)

No description

mixed
mutate(mixed $value)

Mutate the input value.

array
mutateArray(array $array)

No description

Details

__construct(array|string $keys)

No description

Parameters

array|string $keys

The keys to retrieve

final mixed __invoke(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

static Only make(array|string $keys)

No description

Parameters

array|string $keys

The keys to retrieve

Return Value

Only

mixed mutate(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

protected array mutateArray(array $array)

No description

Parameters

array $array

Return Value

array