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

Breadcrumb

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

function CachingStream::__construct

We will treat the buffer object as the body of the stream

Parameters

StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.:

StreamInterface $target Optionally specify where data is cached:

Overrides StreamDecoratorTrait::__construct

File

vendor/guzzlehttp/psr7/src/CachingStream.php, line 34

Class

CachingStream
Stream decorator that can cache previously read bytes from a sequentially read stream.

Namespace

GuzzleHttp\Psr7

Code

public function __construct(StreamInterface $stream, ?StreamInterface $target = null) {
    $this->remoteStream = $stream;
    $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
}

API Navigation

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