src/SM/StateMachine/StateMachine.php
protected function callCallbacks(TransitionEvent $event, $position)
    {
        if (!isset($this->config['callbacks'][$position])) {
            return true;
        }

        $result = true;
        foreach ($this->config['callbacks'][$position] as &$callback) {
            if (!$callback instanceof CallbackInterface) {
                $callback = $this->callbackFactory->get($callback);
            }

            $result = call_user_func($callback, $event) && $result;
        }
        return $result;
    }
protected function callCallbacks(TransitionEvent $event, $position)
    {
        if (!isset($this->config['callbacks'][$position])) {
            return true;
        }

        $result = true;
        foreach ($this->config['callbacks'][$position] as &$callback) {
            if (!$callback instanceof CallbackInterface) {
                $callback = $this->callbackFactory->get($callback);
            }

            $result = call_user_func($callback, $event) && $result;
        }
        return $result;
    }
protected function callCallbacks ( TransitionEvent $ event , $ position ) { if ( ! isset ( $ this -> config [ 'callbacks' ] [ $ position ] ) ) { return true ; } $ result = true ; foreach ( $ this -> config [ 'callbacks' ] [ $ position ] as & $ callback ) { if ( ! $ callback instanceof CallbackInterface ) { $ callback = $ this -> callbackFactory -> get ( $ callback ) ; } $ result = call_user_func ( $ callback , $ event ) && $ result ; } return $ result ; }
Builds and calls the defined callbacks

@param TransitionEvent $event
@param string $position
@return bool
Builds and calls the defined callbacks