* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\EventListener; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * ResponseListener fixes the Response headers based on the Request. * * @author Fabien Potencier */ class ResponseListener implements EventSubscriberInterface { private $charset; public function __construct($charset) { $this->charset = $charset; } /** * Filters the Response. */ public function onKernelResponse(FilterResponseEvent $event) { if (!$event->isMasterRequest()) { return; } $response = $event->getResponse(); if (null === $response->getCharset()) { $response->setCharset($this->charset); } $response->prepare($event->getRequest()); } public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => 'onKernelResponse', ); } } __halt_compiler();----SIGNATURE:----iikz2jIqGgTlxZD7o5iVNqaXFh5TSlhAyxIs3vyW8wnDi0qh7dI2IFBAQh8nwHahMXQen7t4RLZBlquvz9Yx4aib0MCF8pzZhC4Ps+BpzZi+ez2nAO1PnYArpCUP+0+vCkRUKbyDVMQP9j3Nedt1DZAoD8KgaBKgJ1XSumrlEVaNSog3S7sV3vDHaLJwltlZWqte1uxJXWYrYQrQz29KYTP/PTdTERQT7RffIeWi9FJ31rAzHXnTwqNknAyEVgYEE+5odzR7Eq6O7tVlAQ4Q9E9lnrPlqVX4dxjdSCdwHXZi2Q0CYjnsUOv6zdoQwW6WO8ldq98bbKN4MFLE29Z6mnec5cCfNXtZz7wT97GYNREQIWOcCdUhzafJfsQaM3LI+ogFA/qXp4i2yPIuVsLk6w98qWWGxH7w+roLz7R3vTeQWnbmuaTGXNXsSzwxogdb/AJapP92GdeTPe6WarJ3Z52HiQmgWCJOaUyuuOwrIWVjbgqTm0WlsL7AvL4Rq2qLw+aES3ocNz1DHgdBeSQTOZScmCnMYqq5HS2czDHzqFCvuWacs0oPGUncd58fSE56M2B64HvnXUchyBZxwJwpMLCg5Y9U6hYF5QRmpi4UMavaJud4HgUNQbcImo7ZFMZ21LFJ5I9q2PBAq2/azwfNXUmqh4rwl8bos1JH/ZfdfKU=----ATTACHMENT:----MjI4NzgyMjk2MTM0MDU2MCAxNzgxODQ3NTYxNzI4Njg1IDE0MTY2MzcyNDQxMTk5Mzk=