Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (StreamInterface $stream, $limit=-1, $offset=0) | |
eof () | |
getSize () | |
read ($length) | |
seek ($offset, $whence=SEEK_SET) | |
setLimit ($limit) | |
setOffset ($offset) | |
tell () | |
![]() | |
__toString () | |
close () | |
detach () | |
getContents () | |
getMetadata ($key=null) | |
isReadable () | |
isSeekable () | |
isWritable () | |
rewind () | |
write ($string) | |
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 33 of file LimitStream.php.
References GuzzleHttp\Psr7\LimitStream\setLimit(), and GuzzleHttp\Psr7\LimitStream\setOffset().
GuzzleHttp\Psr7\LimitStream::eof | ( | ) |
Returns true if the stream is at the end of the stream.
Implements Psr\Http\Message\StreamInterface.
Definition at line 43 of file LimitStream.php.
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 62 of file LimitStream.php.
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. |
Implements Psr\Http\Message\StreamInterface.
Definition at line 144 of file LimitStream.php.
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 77 of file LimitStream.php.
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 139 of file LimitStream.php.
Referenced by GuzzleHttp\Psr7\LimitStream\__construct().
GuzzleHttp\Psr7\LimitStream::setOffset | ( | $offset | ) |
Set the offset to start limiting from
int | $offset | Offset to seek to and begin byte limiting from |
Definition at line 114 of file LimitStream.php.
Referenced by GuzzleHttp\Psr7\LimitStream\__construct().
GuzzleHttp\Psr7\LimitStream::tell | ( | ) |
Give a relative tell() {Returns the current position of the file read/write pointer
Implements Psr\Http\Message\StreamInterface.
Definition at line 102 of file LimitStream.php.