PHP 클래스 izzum\statemachine\utils\ReaderWriterDelegator

This allows us to load the statemachine configuration from a specific source and use a different sink to write the current state and history information to. You might want to do this to read the relatively static content for the configuration from the filesystem and use a fast backend system to write the state and transition history data to. for example: - use an xml file with the PDO (sql) adapter: izzum\statemachine\loader\XML & izzum\statemachine\persistence\PDO - use a json file with the Redis adapter: izzum\statemachine\loader\JSON & izzum\statemachine\persistence\Redis classes - use php code to configure the machine with the Session adapter: izzum\statemachine\loader\LoaderArray & izzum\statemachine\persistence\Session classes)
저자: Rolf Vreijdenberger
상속: extends izzum\statemachine\persistence\Adapter, implements izzum\statemachine\loader\Loader
파일 보기 프로젝트 열기: rolfvreijdenberger/izzum-statemachine 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( izzum\statemachine\loader\Loader $reader, Adapter $writer )
__toString ( )
add ( Identifier $identifier, $state, $message = null )
getEntityIds ( $machine, $state = null )
getReader ( ) : izzum\statemachine\loader\Loader gets the reader/Loader
getWriter ( ) : Adapter gets the writer/Adapter
isPersisted ( Identifier $identifier )
load ( StateMachine $stateMachine )
processGetState ( Identifier $identifier )
processSetState ( Identifier $identifier, $state, $message = null )
setFailedTransition ( Identifier $identifier, Transition $transition, Exception $e )
toString ( )

메소드 상세

__construct() 공개 메소드

public __construct ( izzum\statemachine\loader\Loader $reader, Adapter $writer )
$reader izzum\statemachine\loader\Loader the Loader instance to decorate
$writer izzum\statemachine\persistence\Adapter the Adapter instance to decorate

__toString() 공개 메소드

public __toString ( )

add() 공개 메소드

public add ( Identifier $identifier, $state, $message = null )
$identifier izzum\statemachine\Identifier

getEntityIds() 공개 메소드

public getEntityIds ( $machine, $state = null )

getReader() 공개 메소드

gets the reader/Loader
public getReader ( ) : izzum\statemachine\loader\Loader
리턴 izzum\statemachine\loader\Loader

getWriter() 공개 메소드

gets the writer/Adapter
public getWriter ( ) : Adapter
리턴 izzum\statemachine\persistence\Adapter

isPersisted() 공개 메소드

public isPersisted ( Identifier $identifier )
$identifier izzum\statemachine\Identifier

load() 공개 메소드

public load ( StateMachine $stateMachine )
$stateMachine izzum\statemachine\StateMachine

processGetState() 공개 메소드

public processGetState ( Identifier $identifier )
$identifier izzum\statemachine\Identifier

processSetState() 공개 메소드

public processSetState ( Identifier $identifier, $state, $message = null )
$identifier izzum\statemachine\Identifier

setFailedTransition() 공개 메소드

public setFailedTransition ( Identifier $identifier, Transition $transition, Exception $e )
$identifier izzum\statemachine\Identifier
$transition izzum\statemachine\Transition
$e Exception

toString() 공개 메소드

public toString ( )