PHP Класс izzum\command\Closure
This allows clients of a Command to inject logic by means of an anonymous
function.
This provides the flexibility to use custom logic in a command without
subclassing a command, while still allowing the use of the command library.
eg: $command = new Closure(function() {echo "hello world";});
$command->execute();//echoes 'hello world'
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Защищенные методы
Описание методов
__construct()
публичный Метод
public __construct ( Closure $closure, array $arguments = [] ) |
$closure |
Closure |
|
$arguments |
array |
an optional array of arguments to pass to the closure |
_execute()
защищенный Метод