src/mg/Ding/Mvc/Http/HttpFrontController.php
public static function handle(array $properties = array(), $baseUrl = '/')
    {
        $exceptionThrown = null;
        $filtersPassed = true;
        $session = HttpSession::getSession();
        $container = ContainerImpl::getInstance($properties);
        self::$_logger = \Logger::getLogger(__CLASS__);
        $baseUrlLen = strlen($baseUrl);
        ob_start();
        $exceptionMapper = $render = $dispatcher = $viewResolver = false;
        $interceptors = array();
        try
        {
            $dispatcher = $container->getBean('HttpDispatcher');
            $viewResolver = $container->getBean('HttpViewResolver');
            $exceptionMapper = $container->getBean('HttpExceptionMapper');
            $render = $container->getBean('HttpViewRender');
            $method = strtolower($_SERVER['REQUEST_METHOD']);
            $url = $_SERVER['REQUEST_URI'];
            $urlStart = strpos($url, $baseUrl);

            self::$_logger->debug('Trying to match: ' . $url);
            if ($urlStart === false || $urlStart > 0) {
                throw new MvcException($url . ' is not a base url.');
            }
            $url = substr($url, $baseUrlLen);
            $variables = array();
            if (!empty($_GET)) {
                $variables = array_merge($variables, $_GET);
            }
            if (!empty($_POST)) {
                $variables = array_merge($variables, $_POST);
            }
            $action = new HttpAction($url, $variables);
            $action->setMethod($method);
            $mapper = $container->getBean('HttpUrlMapper');
            self::dispatch($dispatcher, $viewResolver, $action, $mapper, $render);
        } catch(\Exception $exception) {
            $exceptionThrown = $exception;
            self::$_logger->debug('Got Exception: ' . $exception);
            ob_end_clean();
            ob_start();
            if ($exceptionMapper === false) {
                header('HTTP/1.1 500 Error.');
            } else {
                $action = new HttpAction(
                    get_class($exception), array('exception' => $exception)
                );
                self::dispatch($dispatcher, $viewResolver, $action, $exceptionMapper, $render);
            }
        }
        ob_end_flush();
    }
public static function handle(array $properties = array(), $baseUrl = '/')
    {
        $exceptionThrown = null;
        $filtersPassed = true;
        $session = HttpSession::getSession();
        $container = ContainerImpl::getInstance($properties);
        self::$_logger = \Logger::getLogger(__CLASS__);
        $baseUrlLen = strlen($baseUrl);
        ob_start();
        $exceptionMapper = $render = $dispatcher = $viewResolver = false;
        $interceptors = array();
        try
        {
            $dispatcher = $container->getBean('HttpDispatcher');
            $viewResolver = $container->getBean('HttpViewResolver');
            $exceptionMapper = $container->getBean('HttpExceptionMapper');
            $render = $container->getBean('HttpViewRender');
            $method = strtolower($_SERVER['REQUEST_METHOD']);
            $url = $_SERVER['REQUEST_URI'];
            $urlStart = strpos($url, $baseUrl);

            self::$_logger->debug('Trying to match: ' . $url);
            if ($urlStart === false || $urlStart > 0) {
                throw new MvcException($url . ' is not a base url.');
            }
            $url = substr($url, $baseUrlLen);
            $variables = array();
            if (!empty($_GET)) {
                $variables = array_merge($variables, $_GET);
            }
            if (!empty($_POST)) {
                $variables = array_merge($variables, $_POST);
            }
            $action = new HttpAction($url, $variables);
            $action->setMethod($method);
            $mapper = $container->getBean('HttpUrlMapper');
            self::dispatch($dispatcher, $viewResolver, $action, $mapper, $render);
        } catch(\Exception $exception) {
            $exceptionThrown = $exception;
            self::$_logger->debug('Got Exception: ' . $exception);
            ob_end_clean();
            ob_start();
            if ($exceptionMapper === false) {
                header('HTTP/1.1 500 Error.');
            } else {
                $action = new HttpAction(
                    get_class($exception), array('exception' => $exception)
                );
                self::dispatch($dispatcher, $viewResolver, $action, $exceptionMapper, $render);
            }
        }
        ob_end_flush();
    }
Handles the request. This will instantiate the container with the given
properties (via static method configure(), see below). Then it will
getBean(HttpDispatcher) and call dispatch() on it with an Action created
based on the request uri and method parameters (get, post, etc).

@return void