Reads from multiple streams, one after the other.

This is a read-only stream decorator.

CloneableInstantiable
ImplementsPsr\Http\Message\StreamInterface
Methods
public __construct(array $streams = [])
 
    public __toString()
    public addStream(Psr\Http\Message\StreamInterface $stream)
     

    Add a stream to the AppendStream

    • throws InvalidArgumentException if the stream is not readable
    public close()
     

    Closes each attached stream.

    {@inheritdoc}

    public detach()
     

    Detaches each attached stream.

    Returns null as it's not clear which underlying stream resource to return.

    {@inheritdoc}

    public eof()
    public getContents()
    public getMetadata( $key = NULL)
    public getSize()
     

    Tries to calculate the size by adding the size of each stream.

    If any of the streams do not return a valid number, then the size of the
    append stream cannot be determined and null is returned.

    {@inheritdoc}

    public isReadable()
    public isSeekable()
    public isWritable()
    public read( $length)
     

    Reads from all of the appended streams until the length is met or EOF.

    {@inheritdoc}

    public rewind()
    public seek( $offset, $whence = 0)
     

    Attempts to seek to the given position. Only supports SEEK_SET.

    {@inheritdoc}

    public tell()
    public write( $string)
    Properties
    private $current
    private $pos
    private $seekable
    private $streams
     
    • var StreamInterface[] Streams being decorated
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only