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\Psr7Code
public function __construct(StreamInterface $stream, ?StreamInterface $target = null) {
$this->remoteStream = $stream;
$this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
}