You are here

public function LimitStream::__construct in Lockr 7.3

Parameters

StreamInterface $stream Stream to wrap:

int $limit Total number of bytes to allow to be read: from the stream. Pass -1 for no limit.

int $offset Position to seek to before reading (only: works on seekable streams).

Overrides StreamDecoratorTrait::__construct

File

vendor/guzzlehttp/psr7/src/LimitStream.php, line 27

Class

LimitStream
Decorator used to return only a subset of a stream

Namespace

GuzzleHttp\Psr7

Code

public function __construct(StreamInterface $stream, $limit = -1, $offset = 0) {
  $this->stream = $stream;
  $this
    ->setLimit($limit);
  $this
    ->setOffset($offset);
}