public function ReadLimitEntityBody::seek

Allow for a bounded seek on the read limited entity body

Overrides AbstractEntityBodyDecorator::seek

File

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

Class

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

Namespace

Guzzle\Http

Code

public function seek($offset, $whence = SEEK_SET) {
  return $whence === SEEK_SET ? $this->body
    ->seek(max($this->offset, min($this->offset + $this->limit, $offset))) : false;
}