You are here

private function CachingStream::cacheEntireStream in Lockr 7.3

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 131

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();
}