PHP Class izzum\rules\Closure
This provides flexibility to clients that do not want to subclass a Rule but
still want to work with the rules library.
$rule = new Closure(function ($a, $b) { return $a === $b; }), array(1,2));
$rule->applies();//returns false: 1 is not equal to 2
Show file
Open project: rolfvreijdenberger/izzum-statemachine
Class Usage Examples
Public Methods
Method |
Description |
|
__construct ( Closure $closure, mixed[] $arguments = [] ) |
|
|
Protected Methods
Method Details
__construct()
public method
public __construct ( Closure $closure, mixed[] $arguments = [] ) |
$closure |
Closure |
|
$arguments |
mixed[] |
an optional array of arguments to pass to the closure |
_applies()
protected method