public function ResponseListener::onKernelResponse in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/EventListener/ResponseListener.php \Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse()
Filters the Response.
Parameters
FilterResponseEvent $event A FilterResponseEvent instance:
File
- vendor/
symfony/ http-kernel/ EventListener/ ResponseListener.php, line 37
Class
- ResponseListener
- ResponseListener fixes the Response headers based on the Request.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
public function onKernelResponse(FilterResponseEvent $event) {
if (!$event
->isMasterRequest()) {
return;
}
$response = $event
->getResponse();
if (null === $response
->getCharset()) {
$response
->setCharset($this->charset);
}
$response
->prepare($event
->getRequest());
}