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

        $nextTransitions = [];

        // get all transitions
        $currentStateName = $this->getCurrentState()->getName();
        if (empty($this->transitions[$currentStateName])) {
            throw new \Exception('No transitions found for passed state');
        }

        // get accepted transitions
        foreach ($this->transitions[$currentStateName] as $transitionName => $transition) {
            if (!$transition->isAcceptable()) {
                continue;
            }

            $nextTransitions[$transitionName] = $transition;
        }

        return $nextTransitions;
    }
public function getNextTransitions()
    {
        /* @var $transition \Sokil\State\Transition */

        $nextTransitions = [];

        // get all transitions
        $currentStateName = $this->getCurrentState()->getName();
        if (empty($this->transitions[$currentStateName])) {
            throw new \Exception('No transitions found for passed state');
        }

        // get accepted transitions
        foreach ($this->transitions[$currentStateName] as $transitionName => $transition) {
            if (!$transition->isAcceptable()) {
                continue;
            }

            $nextTransitions[$transitionName] = $transition;
        }

        return $nextTransitions;
    }
public function getNextTransitions ( ) { /* @var $transition \Sokil\State\Transition */ $ nextTransitions = [ ] ; // get all transitions $ currentStateName = $ this -> getCurrentState ( ) -> getName ( ) ; if ( empty ( $ this -> transitions [ $ currentStateName ] ) ) { throw new \ Exception ( 'No transitions found for passed state' ) ; } // get accepted transitions foreach ( $ this -> transitions [ $ currentStateName ] as $ transitionName => $ transition ) { if ( ! $ transition -> isAcceptable ( ) ) { continue ; } $ nextTransitions [ $ transitionName ] = $ transition ; } return $ nextTransitions ; }
Get next transitions
@return array
@throws \Exception
Get next transitions