Copied!

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

Cloneable Final Instantiable
Methods
public __call ( string $method , array $args )
 

Allow decorators to implement custom methods

  • return mixed
public __construct ( Psr\Http\Message\StreamInterface $stream , ? Psr\Http\Message\StreamInterface $target = NULL )
 

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

  • param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
  • param StreamInterface $target Optionally specify where data is cached
public __get ( string $name )
 

Magic method used to create a new stream if streams are not added in
the constructor of a decorator (e.g., LazyOpenStream).

  • return StreamInterface
public __toString () : string
public close () : void
 

Close both the remote stream and buffer stream

public detach ()
public eof () : bool
public getContents () : string
public getMetadata ( $key = NULL )
 
  • return mixed
public getSize () : ? int
public isReadable () : bool
public isSeekable () : bool
public isWritable () : bool
public read ( $length ) : string
public rewind () : void
public seek ( $offset , $whence = 0 GuzzleHttp\Psr7\SEEK_SET) : void
public tell () : int
public write ( $string ) : int
Methods
protected createStream () : Psr\Http\Message\StreamInterface
 

Implement in subclasses to dynamically create streams when requested.

  • throws BadMethodCallException
Properties
private $remoteStream
 
  • var StreamInterface Stream being wrapped
private $skipReadBytes
 
  • var int Number of bytes to skip reading due to a write on the buffer
Methods
private cacheEntireStream () : int
© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration