* * 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:----Zdd2UqLbxJ+8iNciU+4GbIlHmX7S7+eDJEXTcj7dU0tDyIgWnp0+hoR+RZQmOvL7ffMrdVHUwyNc14H89dUcHgSAZm33urllIj1BFOoZ6yU4GAoLcD75NQ8IHj++47Z5zgeUsMJJmh/Dsem7DeP3yIxyYwIb41F7z+m9FWMiyJ4rslgc+oPJ2mMUEBLQqXPo8o4RZ1eYFl6a9cIuRgu5G6Dt5qeOkPm9c5OVC/+bTHSN/+nNzfpPCezgTBCvz/AwaJ/fPRqH15prWLsj9x4wwPmsj87zTP+fvOonEdPPtO9EQ2xzADUwE3DK+Fo2j0me/BUWY7ZDifWb4Fq4kuyfSne1nSMzBvclnYhXgryY+7FpmSV2B8XYqTBB3Afw3qD5Jae9HNgZItpb8ZXosc10YcAO8cR2y/i1hRu/DbecR4oYaIJjkC8/I6w++p0QMpb+9VeWl91w3cevqErsIf8r8IKFsrZqk9+wsceeEkRQKQl4AK84wgLjbTJB7xNs/v8hnDdGCyhPnDahPL5lpBDIZXG4/waLvND8anK5P+tqSFzIy0z6zk2XnumkqpFRVQ9BCvTe0PzTOjecGsPoS5D14F5ida+WkEZQMAq7i+g+YEINz0Uvf5Pbo3PVQ4ZTn5hLJOEYIjXQ6JHHh2N3yWoi3sPfEZ+qvuFj9ZpG1IwhDPk=----ATTACHMENT:----NjMzMzcwMTIzMTA5ODA2NiA0MDMzNzgwNjcyMTY5MjU4IDQxOTE0NzI3ODkzNzEwMjY=