Finite\StateMachine\StateMachineInterface::setStateAccessor PHP Method

setStateAccessor() public method

public setStateAccessor ( Finite\State\Accessor\StateAccessorInterface $stateAccessor )
$stateAccessor Finite\State\Accessor\StateAccessorInterface
    public function setStateAccessor(StateAccessorInterface $stateAccessor);

Usage Example

 /**
  * {@inheritdoc}
  *
  * @param StateMachineInterface $stateMachine
  */
 public function load(StateMachineInterface $stateMachine)
 {
     $stateMachine->setStateAccessor(new PropertyPathStateAccessor($this->config['property_path']));
     $stateMachine->setGraph($this->config['graph']);
     array_walk($this->config['states'], array($stateMachine, 'addState'));
     array_walk($this->config['transitions'], array($stateMachine, 'addTransition'));
 }
All Usage Examples Of Finite\StateMachine\StateMachineInterface::setStateAccessor