You are here

private function CachingStream::cacheEntireStream in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/src/CachingStream.php \GuzzleHttp\Psr7\CachingStream::cacheEntireStream()
1 call to CachingStream::cacheEntireStream()
CachingStream::seek in vendor/guzzlehttp/psr7/src/CachingStream.php
Seek to a position in the stream.

File

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

Class

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

Namespace

GuzzleHttp\Psr7

Code

private function cacheEntireStream() {
  $target = new FnStream([
    'write' => 'strlen',
  ]);
  copy_to_stream($this, $target);
  return $this
    ->tell();
}