public function ReadLimitEntityBody::getContentLength

Returns the Content-Length of the limited subset of data

Overrides AbstractEntityBodyDecorator::getContentLength

File

drupal/core/vendor/guzzle/http/Guzzle/Http/ReadLimitEntityBody.php, line 53

Class

ReadLimitEntityBody
EntityBody decorator used to return only a subset of an entity body

Namespace

Guzzle\Http

Code

public function getContentLength() {
  $length = $this->body
    ->getContentLength();
  return $length === false ? $this->limit : min($this->limit, min($length, $this->offset + $this->limit) - $this->offset);
}