PHP 클래스 SimpleStateStack, simpletest

파일 보기 프로젝트 열기: simpletest/simpletest 1 사용 예제들

공개 메소드들

메소드 설명
__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.