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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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 ( )