Constructor. Starts in named state.
SimpleStateStack
SimpleStateStack
(string $start)
-
string
$start: Starting state name.
Adds a state to the stack and sets it to be the current state.
void
enter
(string $state)
-
string
$state: New state.
Accessor for current state.
string
getCurrent
()
Leaves the current state and reverts to the previous one.
boolean
leave
()