src/Sulu/Bundle/PreviewBundle/Preview/Renderer/PreviewRenderer.php
private function handle(Request $request)
    {
        $kernel = $this->kernelFactory->create($this->environment);

        try {
            return $kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, false);
        } catch (HttpException $e) {
            if ($e->getPrevious()) {
                throw $e->getPrevious();
            }

            throw $e;
        }
    }
private function handle(Request $request)
    {
        $kernel = $this->kernelFactory->create($this->environment);

        try {
            return $kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, false);
        } catch (HttpException $e) {
            if ($e->getPrevious()) {
                throw $e->getPrevious();
            }

            throw $e;
        }
    }
private function handle ( Request $ request ) { $ kernel = $ this -> kernelFactory -> create ( $ this -> environment ) ; try { return $ kernel -> handle ( $ request , HttpKernelInterface :: MASTER_REQUEST , false ) ; } catch ( HttpException $ e ) { if ( $ e -> getPrevious ( ) ) { throw $ e -> getPrevious ( ) ; } throw $ e ; } }
Handles given request and returns response.

@param Request $request

@return Response

@throws \Exception
Handles given request and returns response .