PHP Class izzum\command\Composite

Author: Rolf Vreijdenberger
Inheritance: extends Command, implements izzum\command\IComposite
Show file Open project: rolfvreijdenberger/izzum-statemachine Class Usage Examples

Public Methods

Method Description
__construct ( )
add ( izzum\command\ICommand $command ) this method can be used to add multiple commands that will be used in the execute() method
contains ( izzum\command\ICommand $command ) : boolean does this contain a command (based on identity ===)
count ( ) (non-PHPdoc)
remove ( izzum\command\ICommand $command ) : boolean Removes a command if it is part of the composite (based on identity ===)
toString ( )

Protected Methods

Method Description
_execute ( ) this method will call all commands added to this class in order of addition

Method Details

__construct() public method

public __construct ( )

_execute() protected method

this method will call all commands added to this class in order of addition
protected _execute ( )

add() public method

this method can be used to add multiple commands that will be used in the execute() method
public add ( izzum\command\ICommand $command )
$command izzum\command\ICommand

contains() public method

does this contain a command (based on identity ===)
public contains ( izzum\command\ICommand $command ) : boolean
$command izzum\command\ICommand
return boolean

count() public method

(non-PHPdoc)
See also: izzum\IComposite::count()
public count ( )

remove() public method

Removes a command if it is part of the composite (based on identity ===)
public remove ( izzum\command\ICommand $command ) : boolean
$command izzum\command\ICommand
return boolean

toString() public method

public toString ( )