|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Stream decorator that can cache previously read bytes from a sequentially read stream. More...
Inheritance diagram for GuzzleHttp\Psr7\CachingStream:
Collaboration diagram for GuzzleHttp\Psr7\CachingStream:Public Member Functions | |
| __construct (StreamInterface $stream, StreamInterface $target=null) | |
| We will treat the buffer object as the body of the stream. More... | |
| getSize () | |
| Get the size of the stream if known. More... | |
| rewind () | |
| Seek to the beginning of the stream. More... | |
| seek ($offset, $whence=SEEK_SET) | |
| Seek to a position in the stream. More... | |
| read ($length) | |
| Read data from the stream. More... | |
| write ($string) | |
| Write data to the stream. More... | |
| eof () | |
| Returns true if the stream is at the end of the stream. More... | |
| close () | |
| Close both the remote stream and buffer 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 Member Functions | |
| cacheEntireStream () | |
Private Attributes | |
| $remoteStream | |
| $skipReadBytes = 0 | |
Stream decorator that can cache previously read bytes from a sequentially read stream.
Definition at line 10 of file CachingStream.php.
| GuzzleHttp\Psr7\CachingStream::__construct | ( | StreamInterface | $stream, |
| StreamInterface | $target = null |
||
| ) |
We will treat the buffer object as the body of the stream.
| StreamInterface | $stream | Stream to cache |
| StreamInterface | $target | Optionally specify where data is cached |
Definition at line 26 of file CachingStream.php.
References GuzzleHttp\Psr7\$stream, and $target.
|
private |
Definition at line 131 of file CachingStream.php.
References $target, GuzzleHttp\Psr7\copy_to_stream(), and Psr\Http\Message\StreamInterface\tell().
Referenced by GuzzleHttp\Psr7\CachingStream\seek().
Here is the call graph for this function:
Here is the caller graph for this function:| GuzzleHttp\Psr7\CachingStream::close | ( | ) |
Close both the remote stream and buffer stream.
Implements Psr\Http\Message\StreamInterface.
Definition at line 126 of file CachingStream.php.
| GuzzleHttp\Psr7\CachingStream::eof | ( | ) |
Returns true if the stream is at the end of the stream.
Implements Psr\Http\Message\StreamInterface.
Definition at line 118 of file CachingStream.php.
| GuzzleHttp\Psr7\CachingStream::getSize | ( | ) |
Get the size of the stream if known.
Implements Psr\Http\Message\StreamInterface.
Definition at line 34 of file CachingStream.php.
| GuzzleHttp\Psr7\CachingStream::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 75 of file CachingStream.php.
References $data, and $remaining.
Referenced by GuzzleHttp\Psr7\CachingStream\seek().
Here is the caller graph for this function:| GuzzleHttp\Psr7\CachingStream::rewind | ( | ) |
Seek to the beginning of the stream.
If the stream is not seekable, this method will raise an exception; otherwise, it will perform a seek(0).
Implements Psr\Http\Message\StreamInterface.
Definition at line 39 of file CachingStream.php.
References GuzzleHttp\Psr7\CachingStream\seek().
Here is the call graph for this function:| GuzzleHttp\Psr7\CachingStream::seek | ( | $offset, | |
$whence = SEEK_SET |
|||
| ) |
Seek to a position in the stream.
Implements Psr\Http\Message\StreamInterface.
Definition at line 44 of file CachingStream.php.
References $size, GuzzleHttp\Psr7\CachingStream\cacheEntireStream(), GuzzleHttp\Psr7\CachingStream\read(), and Psr\Http\Message\StreamInterface\tell().
Referenced by GuzzleHttp\Psr7\CachingStream\rewind().
Here is the call graph for this function:
Here is the caller graph for this function:| GuzzleHttp\Psr7\CachingStream::write | ( | $string | ) |
Write data to the stream.
| string | $string | The string that is to be written. |
RuntimeException on failure.
Implements Psr\Http\Message\StreamInterface.
Definition at line 104 of file CachingStream.php.
References Psr\Http\Message\StreamInterface\tell().
Here is the call graph for this function:
|
private |
Definition at line 15 of file CachingStream.php.
|
private |
Definition at line 18 of file CachingStream.php.