public function process($transitionName)
    {
        /* @var $transition \Sokil\State\Transition */

        // get transition
        $transitions = $this->getNextTransitions();
        if (empty($transitions[$transitionName])) {
            throw new \InvalidArgumentException('Wrong transition name');
        }

        $transition = $transitions[$transitionName];

        // set current state
        $this->currentState = $this->states[$transition->getResultingStateName()];

        return $this;
    }
public function process($transitionName)
    {
        /* @var $transition \Sokil\State\Transition */

        // get transition
        $transitions = $this->getNextTransitions();
        if (empty($transitions[$transitionName])) {
            throw new \InvalidArgumentException('Wrong transition name');
        }

        $transition = $transitions[$transitionName];

        // set current state
        $this->currentState = $this->states[$transition->getResultingStateName()];

        return $this;
    }
public function process ( $ transitionName ) { /* @var $transition \Sokil\State\Transition */ // get transition $ transitions = $ this -> getNextTransitions ( ) ; if ( empty ( $ transitions [ $ transitionName ] ) ) { throw new \ InvalidArgumentException ( 'Wrong transition name' ) ; } $ transition = $ transitions [ $ transitionName ] ; // set current state $ this -> currentState = $ this -> states [ $ transition -> getResultingStateName ( ) ] ; return $ this ; }
Process transition from initial to resulting state
@param $transitionName
@return Machine
Process transition from initial to resulting state