/** * {@inheritdoc} */ public function handleRequest(RequestInterface $request) { $symfonyRequest = $request->getHttpFoundationRequest(); $symfonyResponse = $this->kernel->handle($symfonyRequest); $this->kernel->terminate($symfonyRequest, $symfonyResponse); return $symfonyResponse; }
/** * Renders the given route with the given parameter. * * @param Route $route Route. * @param string $name Name of the route; the default value is `null`. * @param array $parameter Array of parameters; the default value is an empty array. * * @return void */ protected function renderWithParameters(Route $route, $name = null, array $parameter = array()) { $request = $this->buildRequest($route, $name, $parameter); $response = $this->kernel->handle($request); $content = $response->getContent(); $this->kernel->terminate($request, $response); $this->kernel->shutdown(); if (null !== $name) { $filename = $this->router->generate($name, $parameter); } else { $filename = $route->getPath(); } $this->writer->write($filename, $content); }
/** * @When the kernel terminates */ public function theKernelTerminates() { $request = Request::create('/', 'GET'); $response = $this->kernel->handle($request); $this->kernel->terminate($request, $response); }
public function terminate(\Symfony\Component\HttpFoundation\Request $request, \Symfony\Component\HttpFoundation\Response $response) { return parent::terminate($request, $response); // TODO: Change the autogenerated stub }