Свойство | Type | Description | |
---|---|---|---|
$currentState | Finite\State\StateInterface | The current state. | |
$dispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
$graph | string | ||
$object | object | The stateful object. | |
$stateAccessor | Finite\State\Accessor\StateAccessorInterface | ||
$states | array | The available states. | |
$transitions | array | The available transitions. |
Méthode | Description | |
---|---|---|
__construct ( object $object = null, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher = null, Finite\State\Accessor\StateAccessorInterface $stateAccessor = null ) | ||
addState ( $state ) | ||
addTransition ( $transition, $initialState = null, $finalState = null ) | ||
apply ( $transitionName, array $parameters = [] ) | ||
can ( $transition, array $parameters = [] ) | ||
findStateWithProperty ( $property, $value = null ) | {@inheritDoc} | |
getCurrentState ( ) | ||
getDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
getGraph ( ) | ||
getObject ( ) | ||
getState ( $name ) | ||
getStates ( ) | ||
getTransition ( $name ) | ||
getTransitions ( ) | ||
hasStateAccessor ( ) | ||
initialize ( ) | ||
setDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher ) | ||
setGraph ( $graph ) | ||
setObject ( $object ) | ||
setStateAccessor ( Finite\State\Accessor\StateAccessorInterface $stateAccessor ) |
Méthode | Description | |
---|---|---|
findInitialState ( ) : string | Find and return the Initial state if exists. |
Méthode | Description | |
---|---|---|
dispatchTransitionEvent ( Finite\Transition\TransitionInterface $transition, Finite\Event\TransitionEvent $event, type $transitionState ) | Dispatches event for the transition |
public __construct ( object $object = null, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher = null, Finite\State\Accessor\StateAccessorInterface $stateAccessor = null ) | ||
$object | object | |
$dispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | |
$stateAccessor | Finite\State\Accessor\StateAccessorInterface |
public addTransition ( $transition, $initialState = null, $finalState = null ) |
protected findInitialState ( ) : string | ||
Résultat | string |
public findStateWithProperty ( $property, $value = null ) |
public getDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
Résultat | Symfony\Component\EventDispatcher\EventDispatcherInterface |
public setDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher ) | ||
$dispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface |
public setStateAccessor ( Finite\State\Accessor\StateAccessorInterface $stateAccessor ) | ||
$stateAccessor | Finite\State\Accessor\StateAccessorInterface |
protected StateInterface,Finite\State $currentState | ||
Résultat | Finite\State\StateInterface |
protected EventDispatcherInterface,Symfony\Component\EventDispatcher $dispatcher | ||
Résultat | Symfony\Component\EventDispatcher\EventDispatcherInterface |
protected StateAccessorInterface,Finite\State\Accessor $stateAccessor | ||
Résultat | Finite\State\Accessor\StateAccessorInterface |
protected array $transitions | ||
Résultat | array |