Conditionable
in
Table of Contents
Methods
- when() : static
- Apply the callback if the given "condition" is (or resolves to) true.
Methods
when()
Apply the callback if the given "condition" is (or resolves to) true.
public
when(callable(static): bool|bool $condition, callable(static): Array $onSuccess[, callable(static): Array|null $onFail = null ]) : static
Parameters
- $condition : callable(static): bool|bool
- $onSuccess : callable(static): Array
- $onFail : callable(static): Array|null = null