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
Inheritance: extends Rule
Show file Open project: rolfvreijdenberger/izzum-statemachine Class Usage Examples

Public Methods

Method Description
__construct ( Closure $closure, mixed[] $arguments = [] )

Protected Methods

Method Description
_applies ( )

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

protected _applies ( )