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'
Автор: Rolf Vreijdenberger
Наследование: extends Command
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Closure $closure, array $arguments = [] )

Защищенные методы

Метод Описание
_execute ( )

Описание методов

__construct() публичный Метод

public __construct ( Closure $closure, array $arguments = [] )
$closure Closure
$arguments array an optional array of arguments to pass to the closure

_execute() защищенный Метод

protected _execute ( )