Example #1
0
 /**
  * @param Request $instance
  */
 protected function applyContentParsers($instance)
 {
     $parameters = [];
     $header = $instance->getContentTypeHeader();
     if ($header === null) {
         return;
     }
     foreach ($this->parsers as $type => $parser) {
         if ($header->match($type)) {
             $parameters += $this->alterParameters($parser, $type, $header, $instance);
         }
     }
     $instance->setParameters($parameters, true);
 }