* * 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\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseEvent; /** * Adds configured formats to each request. * * @author Gildas Quemener */ class AddRequestFormatsListener implements EventSubscriberInterface { protected $formats; public function __construct(array $formats) { $this->formats = $formats; } /** * Adds request formats. */ public function onKernelRequest(GetResponseEvent $event) { $request = $event->getRequest(); foreach ($this->formats as $format => $mimeTypes) { $request->setFormat($format, $mimeTypes); } } /** * {@inheritdoc} */ public static function getSubscribedEvents() { return array(KernelEvents::REQUEST => array('onKernelRequest', 1)); } } __halt_compiler();----SIGNATURE:----trF6vEY4Ax1d5T4S3GlBigzrkJIXnOxt0G5qHwkVl7hTujZ1BHAB+ROhf7zAJGO+PaT/mWW0LpMPIQTrtn6WxXLcR2gB2AO2lm+uCiUFkQ4cYtD+5BSC9kgzD1lGRcIkigmTnS33yPQpTU1dQBrnC0id88SqX0fFfGlyBO9IfktJu0CHSm/mpNVEk6AMPMfKhEkAUzqmKCh74gCMtm1X2/CIS32hAtCazPinfunKvY+0G1eaEGkmkKFnAlvUy71Co2sRBIC3JPPG7vGBz9x7g7mnoFyFb/besabQZlTZ7ohe3S7fW/edYN8rhQ4a4mWDgoCA1EvZX1HYEI1fWSczFHNLQkC6bKoeS/cx8TkW/JW5oWcw8hqvP0+TKIrOOc7XnyAV+TST/7BLhYRoRiC21O3V6n6GxlCanLFEuF5C3H5VmB31TLEYqXij96D3+Al4/Yrd3rINwyUkZMs/LsHCLztdJOqAo1XpcquP3eVuLzV6NGrO3Dhljr9KCwn4rbVXu7YdlrGAzuo/5OPpfCX3JW7xc5DzrTpF3oL1Nw46t6jv9cQSez605YeVoE+4pOVd4i28LDSWhlMGMw5raviQoofR6ihxIQYpTVJ9k2IIRTLb8nO5TcYiUxG4JtX4AUsOiQAafxj0epBvpgT1F/4VB+pW5EkKhbMngYrGresJfaI=----ATTACHMENT:----MzUxMzMwODg5ODMwMjAwNSA1NDc4NjA4NDM4Nzc3NzI0IDQxMzU0MDg2NTcwMjIxNzU=