SimpleTest


SimpleTest\SimpleStateStack
parser.php at line 122

Class SimpleStateStack

SimpleStateStack

public class SimpleStateStack

States for a stack machine.

Subpackage:
WebTester

Constructor Summary

SimpleStateStack(string start)

Constructor.

Method Summary
void

enter(string state)

Adds a state to the stack and sets it to be the current state.

string

getCurrent()

Accessor for current state.

boolean

leave()

Leaves the current state and reverts to the previous one.

Constructor Detail

parser.php at line 130

SimpleStateStack

public SimpleStateStack(string start)

Constructor. Starts in named state.

Parameters:
start - Starting state name.

Method Detail

parser.php at line 149

enter

public void enter(string state)

Adds a state to the stack and sets it to be the current state.

Parameters:
state - New state.

parser.php at line 139

getCurrent

public string getCurrent()

Accessor for current state.

Returns:
State.

parser.php at line 160

leave

public boolean leave()

Leaves the current state and reverts to the previous one.

Returns:
False if we drop off the bottom of the list.

SimpleTest