Compose stream implementations based on a hash of functions.

Allows for easy testing and extension of a provided stream without needing
to create a concrete class for a simple extension point.

CloneableInstantiable
ImplementsPsr\Http\Message\StreamInterface
Methods
public __construct(array $methods)
 


    public __destruct()
     
    The close method is called on the underlying stream only if possible.

    public __get( $name)
     
    Lazily determine which methods are not implemented.

    • throws BadMethodCallException
    public __toString()
    public __wakeup()
     
    An unserialize would allow the __destruct to run when the unserialized value goes out of scope.

    • throws LogicException
    public close()
    public static decorate(Psr\Http\Message\StreamInterface $stream, array $methods)
     
    Adds custom functionality to an underlying stream by intercepting specific method calls.

    public detach()
    public eof()
    public getContents()
    public getMetadata( $key = NULL)
    public getSize()
    public isReadable()
    public isSeekable()
    public isWritable()
    public read( $length)
    public rewind()
    public seek( $offset, $whence = 0)
    public tell()
    public write( $string)
    Properties
    private $methods
     


    • var array
    private static $slots
     


    • var array Methods that must be implemented in the given array
    Properties
    private static $slots
     


    • var array Methods that must be implemented in the given array
    Methods
    public static decorate(Psr\Http\Message\StreamInterface $stream, array $methods)
     
    Adds custom functionality to an underlying stream by intercepting specific method calls.

    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only