class MutatesUsing extends Mutator (View source)

Mutate a value using a callback.

The callback can accept a single argument and return a value

Methods

__construct(mixed $callback)

No description

mixed
__invoke(mixed $value)

Mutate the input value.

from  Mutator
static MutatesUsing
make(mixed $callback)

No description

mixed
mutate(mixed $value)

Mutate the input value.

Details

__construct(mixed $callback)

No description

Parameters

mixed $callback

The callback to use for mutation.

final mixed __invoke(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed

static MutatesUsing make(mixed $callback)

No description

Parameters

mixed $callback

The callback to use for mutation.

Return Value

MutatesUsing

mixed mutate(mixed $value)

Mutate the input value.

Parameters

mixed $value

Return Value

mixed