Esempio n. 1
0
 public function getBody()
 {
     if (!$this->contents) {
         $contents = parent::getBody()->getContents();
         if (false !== ($content = @gzdecode($contents))) {
             $contents = $content;
         }
         $this->contents = $contents;
     }
     return $this->contents;
 }
Esempio n. 2
0
 /**
  * @param HttpAdapterResponse $httpAdapterResponse
  *
  * @return ElasticaResponse
  */
 protected function _createElasticaResponse(HttpAdapterResponse $httpAdapterResponse)
 {
     return new ElasticaResponse((string) $httpAdapterResponse->getBody(), $httpAdapterResponse->getStatusCode());
 }