Copied!

Provides a read only stream that pumps data from a PHP callable.

When invoking the provided callable, the PumpStream will pass the amount of
data requested to read to the callable. The callable can choose to ignore
this value and return fewer or more bytes than requested. Any extra data
returned by the provided callable is buffered internally until drained using
the read() function of the PumpStream. The provided callable MUST return
false when there is no more data to read.

Cloneable Final Instantiable
Methods
public __construct ( callable $source , array $options = [ ] )
 
public __toString () : string
public close () : void
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
Properties
private $buffer
private $metadata
 
  • var array
private $size
 
  • var int | null
private $source
 
  • var callable | null
private $tellPos
 
  • var int
Methods
private pump ( int $length ) : void
© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration