src/mg/Ding/Mvc/Dispatcher.php
public function dispatch(DispatchInfo $dispatchInfo)
    {
        $controller = $dispatchInfo->handler;
        $actionHandler = $dispatchInfo->method;
        $action = $dispatchInfo->action;
        if (!method_exists($controller, $actionHandler)) {
            throw new MvcException('No valid action handler found: ' . $actionHandler);
        }
        $interceptors = $dispatchInfo->interceptors;
        $filtersPassed = true;
        $result = false;
        foreach ($interceptors as $interceptor) {
            $this->_logger->debug("Running pre filter: " . get_class($interceptor));
            $result = $interceptor->preHandle($action, $controller);
            if ($result === false) {
                $filtersPassed = false;
                $this->_logger->debug("Filter returned false, stopping dispatch");
                break;
            } else if ($result instanceof ModelAndView) {
                return $result;
            }
        }
        if ($filtersPassed) {
            $result = $this->invokeAction($controller, $actionHandler, $action->getArguments());
            foreach ($interceptors as $interceptor) {
                $this->_logger->debug("Running post filter: " . get_class($interceptor));
                $interceptor->postHandle($action, $controller);
            }
        }
        return $result;
    }
public function dispatch(DispatchInfo $dispatchInfo)
    {
        $controller = $dispatchInfo->handler;
        $actionHandler = $dispatchInfo->method;
        $action = $dispatchInfo->action;
        if (!method_exists($controller, $actionHandler)) {
            throw new MvcException('No valid action handler found: ' . $actionHandler);
        }
        $interceptors = $dispatchInfo->interceptors;
        $filtersPassed = true;
        $result = false;
        foreach ($interceptors as $interceptor) {
            $this->_logger->debug("Running pre filter: " . get_class($interceptor));
            $result = $interceptor->preHandle($action, $controller);
            if ($result === false) {
                $filtersPassed = false;
                $this->_logger->debug("Filter returned false, stopping dispatch");
                break;
            } else if ($result instanceof ModelAndView) {
                return $result;
            }
        }
        if ($filtersPassed) {
            $result = $this->invokeAction($controller, $actionHandler, $action->getArguments());
            foreach ($interceptors as $interceptor) {
                $this->_logger->debug("Running post filter: " . get_class($interceptor));
                $interceptor->postHandle($action, $controller);
            }
        }
        return $result;
    }
Main action. Will use the action mapper to get a controller that can
handle the given Action, and then the viewresolver to get a View that
can render the returned ModelAndView from the controller.

@param Action  $action Action to dispatch.

@throws MvcException
@return void