class Map extends ArrayMutator (View source)

Applies the callback to the elements of the given array

Methods

__construct(callable $callback)

No description

mixed
__invoke(mixed $value)

Mutate the input value.

from  Mutator
static Map
make(callable $callback)

No description

mixed
mutate(mixed $value)

Mutate the input value.

array
mutateArray(array $array)

No description

Details

__construct(callable $callback)

No description

Parameters

callable $callback

The callback to apply to each element

final mixed __invoke(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

static Map make(callable $callback)

No description

Parameters

callable $callback

The callback to apply to each element

Return Value

Map

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