PHP Interface izzum\command\ICommand

Author: Rolf Vreijdenberger
Show file Open project: rolfvreijdenberger/izzum-statemachine Interface Usage Examples

Public Methods

Method Description
execute ( ) The execute method which is executed somewhere at runtime when the command is invoked.
toString ( ) gives a string representation of the instance

Method Details

execute() public method

Traditionally you should not provide any context to the execute method, as this implies knowledge of where the command is invoked. Any context should be provided at command creation time via dependency injection. The context provided might know how to get additional information at execution time from objects it knows about. Context provided can also be a mock (for unittesting)
public execute ( )

toString() public method

gives a string representation of the instance
public toString ( )