src/Web/Servlet/DispatcherServlet.php
protected function dispatch(Request $servletRequest, Response $servletResponse)
    {
        $mapperHandler = null;
        try {
            /**
             * @var $mv ModelAndView
             */
            $mv = null;
            $dispatchException = null;
            try {
                $mappedHandler = $this->getHandler($servletRequest);
                if ($mappedHandler == null || $mappedHandler->getHandler() == null) {
                    $this->noHandlerFound($servletRequest, $servletResponse);
                    return;
                }
                $ha = $this->getHandlerAdapter($mappedHandler->getHandler());
                if (!$mappedHandler->applyPreHandle($servletRequest, $servletResponse)) {
                    return;
                }
                $mv = $ha->handle($servletRequest, $servletResponse, $mappedHandler->getHandler());
                $mappedHandler->applyPostHandle($servletRequest, $servletResponse, $mv);
            } catch (\Exception $ex) {
                $dispatchException = $ex;
            }
            $this->processDispatchResult($servletRequest, $servletResponse, $mappedHandler, $mv, $dispatchException);
        } catch (\Exception $ex) {
            $this->triggerAfterCompletion($servletRequest, $servletResponse, $mappedHandler, $ex);
        }
    }
protected function dispatch(Request $servletRequest, Response $servletResponse)
    {
        $mapperHandler = null;
        try {
            /**
             * @var $mv ModelAndView
             */
            $mv = null;
            $dispatchException = null;
            try {
                $mappedHandler = $this->getHandler($servletRequest);
                if ($mappedHandler == null || $mappedHandler->getHandler() == null) {
                    $this->noHandlerFound($servletRequest, $servletResponse);
                    return;
                }
                $ha = $this->getHandlerAdapter($mappedHandler->getHandler());
                if (!$mappedHandler->applyPreHandle($servletRequest, $servletResponse)) {
                    return;
                }
                $mv = $ha->handle($servletRequest, $servletResponse, $mappedHandler->getHandler());
                $mappedHandler->applyPostHandle($servletRequest, $servletResponse, $mv);
            } catch (\Exception $ex) {
                $dispatchException = $ex;
            }
            $this->processDispatchResult($servletRequest, $servletResponse, $mappedHandler, $mv, $dispatchException);
        } catch (\Exception $ex) {
            $this->triggerAfterCompletion($servletRequest, $servletResponse, $mappedHandler, $ex);
        }
    }
protected function dispatch ( Request $ servletRequest , Response $ servletResponse ) { $ mapperHandler = null ; try { /**
             * @var $mv ModelAndView
             */ $ mv = null ; $ dispatchException = null ; try { $ mappedHandler = $ this -> getHandler ( $ servletRequest ) ; if ( $ mappedHandler == null || $ mappedHandler -> getHandler ( ) == null ) { $ this -> noHandlerFound ( $ servletRequest , $ servletResponse ) ; return ; } $ ha = $ this -> getHandlerAdapter ( $ mappedHandler -> getHandler ( ) ) ; if ( ! $ mappedHandler -> applyPreHandle ( $ servletRequest , $ servletResponse ) ) { return ; } $ mv = $ ha -> handle ( $ servletRequest , $ servletResponse , $ mappedHandler -> getHandler ( ) ) ; $ mappedHandler -> applyPostHandle ( $ servletRequest , $ servletResponse , $ mv ) ; } catch ( \ Exception $ ex ) { $ dispatchException = $ ex ; } $ this -> processDispatchResult ( $ servletRequest , $ servletResponse , $ mappedHandler , $ mv , $ dispatchException ) ; } catch ( \ Exception $ ex ) { $ this -> triggerAfterCompletion ( $ servletRequest , $ servletResponse , $ mappedHandler , $ ex ) ; } }
Internal dispatch function that gets called by service
@param \AppserverIo\Appserver\ServletEngine\Http\Request  $servletRequest  The current request
@param \AppserverIo\Appserver\ServletEngine\Http\Response $servletResponse The current response
@see DispatcherServlet::service
@return void
Internal dispatch function that gets called by service