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

Breadcrumb

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

function PumpStream::__construct

Parameters

callable(int): (string|false|null) $source Source of the stream data. The callable MAY: accept an integer argument used to control the amount of data to return. The callable MUST return a string when called, or false|null on error or EOF.

array{size?: int, metadata?: array} $options Stream options::

  • metadata: Hash of metadata to use with stream.
  • size: Size of the stream, if known.

File

vendor/guzzlehttp/psr7/src/PumpStream.php, line 46

Class

PumpStream
Provides a read only stream that pumps data from a PHP callable.

Namespace

GuzzleHttp\Psr7

Code

public function __construct(callable $source, array $options = []) {
    $this->source = $source;
    $this->size = $options['size'] ?? null;
    $this->metadata = $options['metadata'] ?? [];
    $this->buffer = new BufferStream();
}

API Navigation

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