When
class When extends Mutator (View source)
If the condition is true, executes $then
or $otherwise
(if set).
Traits
Methods
__construct(mixed $condition, mixed $then, mixed $otherwise = null)
No description
mixed
mutate(mixed $value)
Mutate the input value.
Details
__construct(mixed $condition, mixed $then, mixed $otherwise = null)
No description
static When
make(mixed $condition, mixed $then, mixed $otherwise = null)
No description
mixed
mutate(mixed $value)
Mutate the input value.
protected ComparatorInterface
resolveComparator(mixed $comparator)
No description
protected array
resolveComparators(array $comparators)
No description
protected MutatorInterface
resolveMutator(mixed $mutator)
No description
protected array
resolveMutators(array $mutators)
No description