Ejemplo n.º 1
0
 public function whenIBuildTheRequest()
 {
     $builder = new WebRequestBuilder($this->environment);
     foreach ($this->decoders as $contentType => $decoder) {
         $builder->registerDecoder($contentType, $decoder);
     }
     $this->request = $builder->build();
     return $this->request;
 }
Ejemplo n.º 2
0
 protected function registerDecoders(WebRequestBuilder $builder)
 {
     $builder->registerDecoder(FormDecoder::CONTENT_TYPE, new FormDecoder());
     $builder->registerDecoder(FormDecoder::CONTENT_TYPE_X, new FormDecoder());
     $builder->registerDecoder(ImageDecoder::CONTENT_TYPE, new ImageDecoder());
     $builder->registerDecoder(JsonDecoder::CONTENT_TYPE, new JsonDecoder());
 }