PHP Class izzum\examples\trafficlight\TrafficLight

It has a unique identifier, the color it is currently on and the time since the last switch. - the Rule will query it for information (isReadyToSwitch) - the Commands will manipulate the object to set it's color
Afficher le fichier Open project: rolfvreijdenberger/izzum-statemachine Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $id )
isReadyToSwitch ( )
setGreen ( )
setOrange ( )
setRed ( )
toString ( )

Méthodes protégées

Méthode Description
onColorFor ( $time )
setColor ( $color )
setId ( $id )
setSwitchTime ( )

Method Details

__construct() public méthode

public __construct ( $id )

isReadyToSwitch() public méthode

public isReadyToSwitch ( )

onColorFor() protected méthode

protected onColorFor ( $time )

setColor() protected méthode

protected setColor ( $color )

setGreen() public méthode

public setGreen ( )

setId() protected méthode

protected setId ( $id )

setOrange() public méthode

public setOrange ( )

setRed() public méthode

public setRed ( )

setSwitchTime() protected méthode

protected setSwitchTime ( )

toString() public méthode

public toString ( )