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
Afficher le fichier
Open project: rolfvreijdenberger/izzum-statemachine
Class Usage Examples
Méthodes publiques
Méthode |
Description |
|
__construct ( Closure $closure, mixed[] $arguments = [] ) |
|
|
Méthodes protégées
Method Details
__construct()
public méthode
public __construct ( Closure $closure, mixed[] $arguments = [] ) |
$closure |
Closure |
|
$arguments |
mixed[] |
an optional array of arguments to pass to the closure |
_applies()
protected méthode