Decorator used to return only a subset of a stream.
CloneableFinalInstantiable
- Implements
Psr\Http\Message\StreamInterface Stringable - Traits
Methods |
public __call(string $method, array $args) Allow decorators to implement custom methods
|
public __construct(Psr\Http\Message\StreamInterface $stream, int $limit = -1, int $offset = 0)
|
public __get(string $name) Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).
|
public __toString() : string |
public close() : void |
public detach() |
public eof() : bool |
public getContents() : string |
public getMetadata( $key = NULL)
|
public getSize() : ?int Returns the size of the limited subset of data |
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 Allow for a bounded seek on the read limited stream |
public setLimit(int $limit) : void Set the limit of bytes that the decorator allows to be read from the stream.
|
public setOffset(int $offset) : void Set the offset to start limiting from
|
public tell() : int Give a relative tell() |
public write( $string) : int |
Methods |
protected createStream() : Psr\Http\Message\StreamInterface Implement in subclasses to dynamically create streams when requested.
|
Properties |
private $limit = NULL
|
private $offset = NULL
|
private $stream = NULL
|