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