You are here

private function HttpKernel::filterResponse in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/HttpKernel.php \Symfony\Component\HttpKernel\HttpKernel::filterResponse()

Filters a response object.

Parameters

Response $response A Response instance:

Request $request An error message in case the response is not a Response object:

int $type The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST):

Return value

Response The filtered Response instance

Throws

\RuntimeException if the passed object is not a Response instance

2 calls to HttpKernel::filterResponse()
HttpKernel::handleException in vendor/symfony/http-kernel/HttpKernel.php
Handles an exception by trying to convert it to a Response.
HttpKernel::handleRaw in vendor/symfony/http-kernel/HttpKernel.php
Handles a request to convert it to a response.

File

vendor/symfony/http-kernel/HttpKernel.php, line 175

Class

HttpKernel
HttpKernel notifies events to convert a Request object to a Response one.

Namespace

Symfony\Component\HttpKernel

Code

private function filterResponse(Response $response, Request $request, $type) {
  $event = new FilterResponseEvent($this, $request, $type, $response);
  $this->dispatcher
    ->dispatch(KernelEvents::RESPONSE, $event);
  $this
    ->finishRequest($request, $type);
  return $event
    ->getResponse();
}