PHP 클래스 Metabor\Statemachine\Statemachine

저자: Oliver Tischlinger
상속: extends Metabor\Observer\Subject, implements MetaborStd\Statemachine\StatemachineInterface
파일 보기 프로젝트 열기: metabor/statemachine 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( object $subject, MetaborStd\Statemachine\ProcessInterface $process, string $stateName = null, MetaborStd\Statemachine\Factory\TransitionSelectorInterface $transitonSelector = null, MetaborStd\Semaphore\MutexInterface $mutex = null )
acquireLock ( ) : boolean Use this function if you want to aquire lock before calling triggerEvent or checkTransitions.
checkTransitions ( ArrayAccess $context = null )
dispatchEvent ( MetaborStd\Event\DispatcherInterface $dispatcher, string $name, ArrayAccess $context = null )
getCurrentContext ( ) : ArrayAccess
getCurrentState ( )
getLastState ( ) : MetaborStd\Statemachine\StateInterface
getProcess ( ) : MetaborStd\Statemachine\ProcessInterface
getSelectedTransition ( ) : MetaborStd\Statemachine\TransitionInterface
getSubject ( )
onDispatcherReady ( ) is called after dispatcher was executed.
triggerEvent ( string $name, ArrayAccess $context = null )

보호된 메소드들

메소드 설명
acquireLockOrThrowException ( )
doCheckTransitions ( ArrayAccess $context, MetaborStd\Event\EventInterface $event = null )

메소드 상세

__construct() 공개 메소드

public __construct ( object $subject, MetaborStd\Statemachine\ProcessInterface $process, string $stateName = null, MetaborStd\Statemachine\Factory\TransitionSelectorInterface $transitonSelector = null, MetaborStd\Semaphore\MutexInterface $mutex = null )
$subject object
$process MetaborStd\Statemachine\ProcessInterface
$stateName string
$transitonSelector MetaborStd\Statemachine\Factory\TransitionSelectorInterface
$mutex MetaborStd\Semaphore\MutexInterface

acquireLock() 공개 메소드

Lock is aquired automatically when calling dispatchEvent or checkTransitions.
public acquireLock ( ) : boolean
리턴 boolean

acquireLockOrThrowException() 보호된 메소드

checkTransitions() 공개 메소드

public checkTransitions ( ArrayAccess $context = null )
$context ArrayAccess

dispatchEvent() 공개 메소드

public dispatchEvent ( MetaborStd\Event\DispatcherInterface $dispatcher, string $name, ArrayAccess $context = null )
$dispatcher MetaborStd\Event\DispatcherInterface
$name string
$context ArrayAccess

doCheckTransitions() 보호된 메소드

protected doCheckTransitions ( ArrayAccess $context, MetaborStd\Event\EventInterface $event = null )
$context ArrayAccess
$event MetaborStd\Event\EventInterface

getCurrentContext() 공개 메소드

getCurrentState() 공개 메소드

public getCurrentState ( )

getLastState() 공개 메소드

public getLastState ( ) : MetaborStd\Statemachine\StateInterface
리턴 MetaborStd\Statemachine\StateInterface

getProcess() 공개 메소드

public getProcess ( ) : MetaborStd\Statemachine\ProcessInterface
리턴 MetaborStd\Statemachine\ProcessInterface

getSelectedTransition() 공개 메소드

public getSelectedTransition ( ) : MetaborStd\Statemachine\TransitionInterface
리턴 MetaborStd\Statemachine\TransitionInterface

getSubject() 공개 메소드

또한 보기: MetaborStd\Statemachine\StatemachineInterface::getSubject()
public getSubject ( )

onDispatcherReady() 공개 메소드

is called after dispatcher was executed.
public onDispatcherReady ( )

triggerEvent() 공개 메소드

public triggerEvent ( string $name, ArrayAccess $context = null )
$name string
$context ArrayAccess