PHP 클래스 izzum\statemachine\loader\LoaderArray

The LoaderArray should always be the object that is used by other Loader implementations. This means other LoaderInterface implementations should delegate the loading to this class. You could implement the Loader interface and use object composition for the LoaderArray. A transition will be unique per StateMachine and is uniquely defined by the tuple of a starting state name and a destination state name. The data of the rule, command or the identity (===) of the states does not matter when a Transition is added to a StateMachine. The machine will react on a first come first serve basis. In short, just make sure your configuration data is ok. TRICKY: if multiple transitions share the same State object (for example as their origin/from state or their destination/to state) then at least make sure that those states share the exact same data. Ideally, they should point to the same State instance. Otherwise, transitions and states are actually stored on the statemachine on a first wins basis (the later transition/state instance is not stored). Transitions will be sorted before they are added to the machine based on if they contain a regex or not. All regex transitions will be added to the machine after the non-regex transitions have been added.
또한 보기: Transitions
또한 보기: State
또한 보기: PDO
저자: Rolf Vreijdenberger
상속: implements izzum\statemachine\loader\Loader
파일 보기 프로젝트 열기: rolfvreijdenberger/izzum-statemachine 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$transitions izzum\statemachine\Transition[]

공개 메소드들

메소드 설명
__construct ( Transition[] $transitions = [] )
__toString ( )
add ( Transition $transition ) add/overwrite a transition
count ( ) : integer counts the number of contained transitions.
getTransitions ( ) : Transition[] This method will return the transitions instances with the correct references to each other.
load ( StateMachine $stateMachine ) {@inheritDoc}
toString ( )

메소드 상세

__construct() 공개 메소드

public __construct ( Transition[] $transitions = [] )
$transitions izzum\statemachine\Transition[] the transitions to be loaded

__toString() 공개 메소드

public __toString ( )

add() 공개 메소드

add/overwrite a transition
public add ( Transition $transition )
$transition izzum\statemachine\Transition

count() 공개 메소드

this is not the same as the possible amount of transitions added (because of regex transitions)
public count ( ) : integer
리턴 integer

getTransitions() 공개 메소드

This method will return the transitions instances with the correct references to each other.
public getTransitions ( ) : Transition[]
리턴 izzum\statemachine\Transition[]

load() 공개 메소드

{@inheritDoc}
public load ( StateMachine $stateMachine )
$stateMachine izzum\statemachine\StateMachine

toString() 공개 메소드

public toString ( )

프로퍼티 상세

$transitions 보호되어 있는 프로퍼티

protected Transition[],izzum\statemachine $transitions
리턴 izzum\statemachine\Transition[]