PHP Class izzum\statemachine\persistence\Memory

This is the default persistence adapter for a Context. TRICKY: This memory adapter only functions during the execution of one (1) php process. Therefore, it is best used in a runtime environment such as a php daemon program or an interactive command line php script.
Author: Rolf Vreijdenberger
Inheritance: extends Adapter
Mostrar archivo Open project: rolfvreijdenberger/izzum-statemachine Class Usage Examples

Public Methods

Method Description
clear ( ) clears the storage facility.
get ( )
getEntityIds ( $machine, $state = null ) {@inheritDoc}
getStorageFromRegistry ( Identifier $identifier )
isPersisted ( Identifier $identifier ) {@inheritDoc}
processGetState ( Identifier $identifier ) {@inheritDoc}

Protected Methods

Method Description
addHistory ( Identifier $identifier, $state, $message = null, $is_exception = false ) {@inheritDoc}
getRegistry ( ) : StorageData[]
getStateFromRegistry ( Identifier $identifier )
insertState ( Identifier $identifier, $state, $message = null ) {@inheritDoc}
setStateInRegistry ( Identifier $identifier, string $state, $message = null )
updateState ( Identifier $identifier, $state, $message = null ) {@inheritDoc}
writeRegistry ( string $key, StorageData $value )

Method Details

addHistory() protected method

{@inheritDoc}
protected addHistory ( Identifier $identifier, $state, $message = null, $is_exception = false )
$identifier izzum\statemachine\Identifier

clear() public static method

Not a method we want to have on the Adapter interface. this method is useful for testing.
public static clear ( )

get() public static method

public static get ( )

getEntityIds() public method

{@inheritDoc}
public getEntityIds ( $machine, $state = null )

getRegistry() protected method

protected getRegistry ( ) : StorageData[]
return StorageData[]

getStateFromRegistry() protected method

protected getStateFromRegistry ( Identifier $identifier )
$identifier izzum\statemachine\Identifier

getStorageFromRegistry() public method

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

insertState() protected method

{@inheritDoc}
protected insertState ( Identifier $identifier, $state, $message = null )
$identifier izzum\statemachine\Identifier

isPersisted() public method

{@inheritDoc}
public isPersisted ( Identifier $identifier )
$identifier izzum\statemachine\Identifier

processGetState() public method

{@inheritDoc}
public processGetState ( Identifier $identifier )
$identifier izzum\statemachine\Identifier

setStateInRegistry() protected method

protected setStateInRegistry ( Identifier $identifier, string $state, $message = null )
$identifier izzum\statemachine\Identifier
$state string

updateState() protected method

{@inheritDoc}
protected updateState ( Identifier $identifier, $state, $message = null )
$identifier izzum\statemachine\Identifier

writeRegistry() protected method

protected writeRegistry ( string $key, StorageData $value )
$key string
$value StorageData