/** * {@inheritdoc} */ public function populateFromResponse(ResponseInterface $response) : self { parent::populateFromResponse($response); $this->objectCount = $response->getHeaderLine('X-Container-Object-Count'); $this->bytesUsed = $response->getHeaderLine('X-Container-Bytes-Used'); $this->metadata = $this->parseMetadata($response); return $this; }
/** * {@inheritdoc} */ public function populateFromResponse(ResponseInterface $response) : self { parent::populateFromResponse($response); $this->hash = $response->getHeaderLine('ETag'); $this->contentLength = $response->getHeaderLine('Content-Length'); $this->lastModified = $response->getHeaderLine('Last-Modified'); $this->contentType = $response->getHeaderLine('Content-Type'); $this->metadata = $this->parseMetadata($response); return $this; }
public function populateFromArray(array $data) : self { parent::populateFromArray($data); $baseUri = $this->getHttpBaseUrl(); if (isset($data['file'])) { $this->fileUri = Utils::appendPath($baseUri, $data['file']); } if (isset($data['schema'])) { $this->schemaUri = Utils::appendPath($baseUri, $data['schema']); } return $this; }
/** * {@inheritDoc} */ public function populateFromResponse(ResponseInterface $response) { parent::populateFromResponse($response); $this->id = $response->getHeaderLine('X-Subject-Token'); return $this; }
public function populateFromResponse(ResponseInterface $response) : self { parent::populateFromResponse($response); $this->metadata = $this->parseMetadata($response); return $this; }
/** * {@inheritDoc} */ public function populateFromArray(array $array) : self { return parent::populateFromArray(Utils::flattenJson($array, $this->resourceKey)); }