Copied!

PHP stream implementation.

Cloneable Instantiable
  • Implements
    Psr\Http\Message\StreamInterface
    Stringable
Methods
public __construct ( $stream , array $options = [ ] )
 

This constructor accepts an associative array of options.

  • size: (int) If a read stream would otherwise have an indeterminate
    size, but the size is known due to foreknowledge, then you can
    provide that size, in bytes.
  • metadata: (array) Any additional metadata to return when the metadata
    of the stream is accessed.
  • param resource $stream Stream resource to wrap.
  • throws InvalidArgumentException if the stream is not a stream resource
public __destruct ()
 

Closes the stream when the destructed

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
Constants
private GuzzleHttp\Psr7\Stream ::READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/'
 
  • see http://php.net/manual/function.fopen.php
  • see http://php.net/manual/en/function.gzopen.php
private GuzzleHttp\Psr7\Stream ::WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/'
Properties
private $customMetadata
 
  • var array
private $readable
 
  • var bool
private $seekable
 
  • var bool
private $size
 
  • var int | null
private $stream
 
  • var resource
private $uri
 
  • var string | null
private $writable
 
  • var bool
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration