PHP Класс SimpleStateStack, simpletest

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

enter() публичный Метод

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

getCurrent() публичный Метод

Accessor for current state.
public getCurrent ( ) : string
Результат string State.

leave() публичный Метод

Leaves the current state and reverts to the previous one.
public leave ( ) : boolean
Результат boolean False if we drop off the bottom of the list.