PHP Класс 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
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Метод |
Описание |
|
__construct ( Closure $closure, mixed[] $arguments = [] ) |
|
|
Защищенные методы
Описание методов
__construct()
публичный Метод
public __construct ( Closure $closure, mixed[] $arguments = [] ) |
$closure |
Closure |
|
$arguments |
mixed[] |
an optional array of arguments to pass to the closure |
_applies()
защищенный Метод