Fork me on Github

Class Finite\ Context

The Finite context.

It provides easy ways to deal with Stateful objects, and factory

Methods

__construct( FactoryInterface $factory)

string getState( StatefulInterface $object)

array<string> getTransitions( StatefulInterface $object)

array<string> getProperties( StatefulInterface $object)

bool hasProperty( StatefulInterface $object, string $property)

StateMachine getStateMachine( StatefulInterface $object)

FactoryInterface getFactory()

Details

public __construct( FactoryInterface $factory)

Parameters
FactoryInterface $factory

public string getState( StatefulInterface $object)

Parameters
StatefulInterface $object
Return Value
string

public array<string> getTransitions( StatefulInterface $object)

Parameters
StatefulInterface $object
Return Value
array<string>

public array<string> getProperties( StatefulInterface $object)

Parameters
StatefulInterface $object
Return Value
array<string>

public bool hasProperty( StatefulInterface $object, string $property)

Parameters
StatefulInterface $object
string $property
Return Value
bool

public StateMachine getStateMachine( StatefulInterface $object)

Parameters
StatefulInterface $object
Return Value
StateMachine

public FactoryInterface getFactory()

Return Value
FactoryInterface