Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LimitStream.php

function LimitStream::__construct

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 32

Class

LimitStream
Decorator used to return only a subset of a stream.

Namespace

GuzzleHttp\Psr7

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal