PHP Class SimpleStateStack, simpletest

Afficher le fichier Open project: simpletest/simpletest Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $start ) Constructor. Starts in named state.
enter ( string $state ) Adds a state to the stack and sets it to be the current state.
getCurrent ( ) : string Accessor for current state.
leave ( ) : boolean Leaves the current state and reverts to the previous one.

Method Details

__construct() public méthode

Constructor. Starts in named state.
public __construct ( string $start )
$start string Starting state name.

enter() public méthode

Adds a state to the stack and sets it to be the current state.
public enter ( string $state )
$state string New state.

getCurrent() public méthode

Accessor for current state.
public getCurrent ( ) : string
Résultat string State.

leave() public méthode

Leaves the current state and reverts to the previous one.
public leave ( ) : boolean
Résultat boolean False if we drop off the bottom of the list.