|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Decorator used to return only a subset of a stream. More...
Inheritance diagram for GuzzleHttp\Psr7\LimitStream:
Collaboration diagram for GuzzleHttp\Psr7\LimitStream:Public Member Functions | |||
| __construct (StreamInterface $stream, $limit=-1, $offset=0) | |||
| eof () | |||
| Returns true if the stream is at the end of the stream. More... | |||
| getSize () | |||
Returns the size of the limited subset of data {Get the size of the stream if known.
| |||
| seek ($offset, $whence=SEEK_SET) | |||
Allow for a bounded seek on the read limited stream {Seek to a position in the stream.int $offset Stream offset int $whence Specifies how the cursor position will be calculated based on the seek offset. Valid values are identical to the built-in PHP $whence values for fseek(). SEEK_SET: Set position equal to offset bytes SEEK_CUR: Set position to current location plus offset SEEK_END: Set position to end-of-stream plus offset. on failure.}. More... | |||
| tell () | |||
Give a relative tell() {Returns the current position of the file read/write pointer.
RuntimeException on error.}. More... | |||
| setOffset ($offset) | |||
| Set the offset to start limiting from. More... | |||
| setLimit ($limit) | |||
| Set the limit of bytes that the decorator allows to be read from the stream. More... | |||
| read ($length) | |||
| Read data from the stream. More... | |||
Public Member Functions inherited from Psr\Http\Message\StreamInterface | |||
| __toString () | |||
| Reads all data from the stream into a string, from the beginning to end. More... | |||
| close () | |||
| Closes the stream and any underlying resources. More... | |||
| detach () | |||
| Separates any underlying resources from the stream. More... | |||
| getSize () | |||
| Get the size of the stream if known. More... | |||
| tell () | |||
| Returns the current position of the file read/write pointer. More... | |||
| eof () | |||
| Returns true if the stream is at the end of the stream. More... | |||
| isSeekable () | |||
| Returns whether or not the stream is seekable. More... | |||
| seek ($offset, $whence=SEEK_SET) | |||
| Seek to a position in the stream. More... | |||
| rewind () | |||
| Seek to the beginning of the stream. More... | |||
| isWritable () | |||
| Returns whether or not the stream is writable. More... | |||
| write ($string) | |||
| Write data to the stream. More... | |||
| isReadable () | |||
| Returns whether or not the stream is readable. More... | |||
| read ($length) | |||
| Read data from the stream. More... | |||
| getContents () | |||
| Returns the remaining contents in a string. More... | |||
| getMetadata ($key=null) | |||
| Get stream metadata as an associative array or retrieve a specific key. More... | |||
Private Attributes | |
| $offset | |
| $limit | |
Decorator used to return only a subset of a stream.
Definition at line 10 of file LimitStream.php.
| GuzzleHttp\Psr7\LimitStream::__construct | ( | StreamInterface | $stream, |
$limit = -1, |
|||
$offset = 0 |
|||
| ) |
| StreamInterface | $stream | Stream to wrap |
| int | $limit | Total number of bytes to allow to be read from the stream. Pass -1 for no limit. |
| int | $offset | Position to seek to before reading (only works on seekable streams). |
Definition at line 27 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\$limit, GuzzleHttp\Psr7\LimitStream\$offset, GuzzleHttp\Psr7\$stream, GuzzleHttp\Psr7\LimitStream\setLimit(), and GuzzleHttp\Psr7\LimitStream\setOffset().
Here is the call graph for this function:| GuzzleHttp\Psr7\LimitStream::eof | ( | ) |
Returns true if the stream is at the end of the stream.
Implements Psr\Http\Message\StreamInterface.
Definition at line 37 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\$limit.
| GuzzleHttp\Psr7\LimitStream::getSize | ( | ) |
Returns the size of the limited subset of data {Get the size of the stream if known.
Implements Psr\Http\Message\StreamInterface.
Definition at line 56 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\$offset.
| int Limit the number of bytes that can be GuzzleHttp\Psr7\LimitStream::read | ( | $length | ) |
Read data from the stream.
| int | $length | Read up to $length bytes from the object and return them. Fewer than $length bytes may be returned if underlying stream call returns fewer bytes. |
RuntimeException if an error occurs.
Implements Psr\Http\Message\StreamInterface.
Definition at line 138 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\$limit, and $remaining.
| GuzzleHttp\Psr7\LimitStream::seek | ( | $offset, | |
$whence = SEEK_SET |
|||
| ) |
Allow for a bounded seek on the read limited stream {Seek to a position in the stream.int $offset Stream offset int $whence Specifies how the cursor position will be calculated based on the seek offset. Valid values are identical to the built-in PHP $whence values for fseek(). SEEK_SET: Set position equal to offset bytes SEEK_CUR: Set position to current location plus offset SEEK_END: Set position to end-of-stream plus offset. on failure.}.
Implements Psr\Http\Message\StreamInterface.
Definition at line 71 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\$limit, and GuzzleHttp\Psr7\LimitStream\$offset.
| GuzzleHttp\Psr7\LimitStream::setLimit | ( | $limit | ) |
Set the limit of bytes that the decorator allows to be read from the stream.
| int | $limit | Number of bytes to allow to be read from the stream. Use -1 for no limit. |
Definition at line 133 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\$limit.
Referenced by GuzzleHttp\Psr7\LimitStream\__construct().
Here is the caller graph for this function:| GuzzleHttp\Psr7\LimitStream::setOffset | ( | $offset | ) |
Set the offset to start limiting from.
| int | $offset | Offset to seek to and begin byte limiting from |
RuntimeException if the stream cannot be seeked.
Definition at line 108 of file LimitStream.php.
References $current, and GuzzleHttp\Psr7\LimitStream\$offset.
Referenced by GuzzleHttp\Psr7\LimitStream\__construct().
Here is the caller graph for this function:| GuzzleHttp\Psr7\LimitStream::tell | ( | ) |
Give a relative tell() {Returns the current position of the file read/write pointer.
RuntimeException on error.}.
Implements Psr\Http\Message\StreamInterface.
Definition at line 96 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\$offset.
|
private |
Definition at line 18 of file LimitStream.php.
Referenced by GuzzleHttp\Psr7\LimitStream\__construct(), GuzzleHttp\Psr7\LimitStream\eof(), GuzzleHttp\Psr7\LimitStream\read(), GuzzleHttp\Psr7\LimitStream\seek(), and GuzzleHttp\Psr7\LimitStream\setLimit().
|
private |
Definition at line 15 of file LimitStream.php.
Referenced by GuzzleHttp\Psr7\LimitStream\__construct(), GuzzleHttp\Psr7\LimitStream\getSize(), GuzzleHttp\Psr7\LimitStream\seek(), GuzzleHttp\Psr7\LimitStream\setOffset(), and GuzzleHttp\Psr7\LimitStream\tell().