private function filterResponse(Response $response, Request $request, int $type)
    {
        $event = new ResponseEvent($this, $request, $type, $response);

        $this->dispatcher->dispatch($event, KernelEvents::RESPONSE);

        $this->finishRequest($request, $type);

        return $event->getResponse();
    }
private function filterResponse(Response $response, Request $request, int $type)
    {
        $event = new ResponseEvent($this, $request, $type, $response);

        $this->dispatcher->dispatch($event, KernelEvents::RESPONSE);

        $this->finishRequest($request, $type);

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

@param Response $response A Response instance
@param Request  $request  An error message in case the response is not a Response object
@param int      $type     The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST)

@return Response The filtered Response instance

@throws \RuntimeException if the passed object is not a Response instance
Filters a response object .