PHP stream implementation.

  • Implements
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.
  • param array{size?: int, metadata?: array} $options Associative array of options.
  • 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 = 0GuzzleHttp\Psr7\SEEK_SET) : void
public tell() : int
public write( $string) : int
private GuzzleHttp\Psr7\Stream::READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/'
  • see
  • see
private GuzzleHttp\Psr7\Stream::WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/'
private $customMetadata = NULL
  • var array
private $readable = NULL
  • var bool
private $seekable = NULL
  • var bool
private $size = NULL
  • var int|null
private $stream = NULL
  • var resource
private $uri = NULL
  • var string|null
private $writable = NULL
  • var bool
© 2024 Bruce Wells
Search Namespaces \ Classes