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