ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Describes a data stream. More...
Public Member Functions | |
__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... | |
Describes a data stream.
Typically, an instance will wrap a PHP stream; this interface provides a wrapper around the most common operations, including serialization of the entire stream to a string.
Definition at line 12 of file StreamInterface.php.
Psr\Http\Message\StreamInterface::__toString | ( | ) |
Reads all data from the stream into a string, from the beginning to end.
This method MUST attempt to seek to the beginning of the stream before reading data and read the stream until the end is reached.
Warning: This could attempt to load a large amount of data into memory.
This method MUST NOT raise an exception in order to conform with PHP's string casting operations.
Implemented in ILIAS\Filesystem\Stream\Stream, Slim\Http\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\FnStream, ZipStream\Stream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\AppendStream, and GuzzleHttp\Psr7\BufferStream.
Psr\Http\Message\StreamInterface::close | ( | ) |
Closes the stream and any underlying resources.
Implemented in Slim\Http\Stream, GuzzleHttp\Psr7\CachingStream, GuzzleHttp\Psr7\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\BufferStream, and ZipStream\Stream.
Psr\Http\Message\StreamInterface::detach | ( | ) |
Separates any underlying resources from the stream.
After the stream has been detached, the stream is in an unusable state.
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\BufferStream, and ZipStream\Stream.
Referenced by ILIAS\Filesystem\Stream\Streams\ofPsr7Stream(), ILIAS\Filesystem\Provider\FlySystem\FlySystemFileStreamAccess\putStream(), ILIAS\Filesystem\Provider\FlySystem\FlySystemFileStreamAccess\updateStream(), and ILIAS\Filesystem\Provider\FlySystem\FlySystemFileStreamAccess\writeStream().
Psr\Http\Message\StreamInterface::eof | ( | ) |
Returns true if the stream is at the end of the stream.
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, ZipStream\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\CachingStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\BufferStream, GuzzleHttp\Psr7\PumpStream, and GuzzleHttp\Psr7\LimitStream.
Referenced by GuzzleHttp\Psr7\copy_to_stream(), GuzzleHttp\Psr7\copy_to_string(), ZipStream\File\deflateData(), GuzzleHttp\Psr7\hash(), ZipStream\File\processStreamWithComputedHeader(), GuzzleHttp\Psr7\readline(), and ZipStream\File\readStream().
Psr\Http\Message\StreamInterface::getContents | ( | ) |
Returns the remaining contents in a string.
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, ZipStream\Stream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\AppendStream, and GuzzleHttp\Psr7\BufferStream.
Psr\Http\Message\StreamInterface::getMetadata | ( | $key = null | ) |
Get stream metadata as an associative array or retrieve a specific key.
The keys returned are identical to the keys returned from PHP's stream_get_meta_data() function.
Implemented in ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\BufferStream, ZipStream\Stream, and Slim\Http\Stream.
Referenced by ilCountPDFPagesPreProcessors\process(), and ILIAS\FileUpload\Processor\VirusScannerPreProcessor\process().
Psr\Http\Message\StreamInterface::getSize | ( | ) |
Get the size of the stream if known.
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, ZipStream\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\LimitStream, GuzzleHttp\Psr7\BufferStream, and GuzzleHttp\Psr7\CachingStream.
Referenced by GuzzleHttp\Psr7\MultipartStream\createElement().
Psr\Http\Message\StreamInterface::isReadable | ( | ) |
Returns whether or not the stream is readable.
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, ZipStream\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, and GuzzleHttp\Psr7\BufferStream.
Referenced by GuzzleHttp\Psr7\AppendStream\addStream(), and GuzzleHttp\Psr7\StreamWrapper\getResource().
Psr\Http\Message\StreamInterface::isSeekable | ( | ) |
Returns whether or not the stream is seekable.
Implemented in Slim\Http\Stream, GuzzleHttp\Psr7\AppendStream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\FnStream, ZipStream\Stream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\BufferStream, and GuzzleHttp\Psr7\NoSeekStream.
Referenced by GuzzleHttp\Psr7\AppendStream\addStream().
Psr\Http\Message\StreamInterface::isWritable | ( | ) |
Returns whether or not the stream is writable.
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\AppendStream, ZipStream\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\BufferStream, and GuzzleHttp\Psr7\MultipartStream.
Referenced by GuzzleHttp\Psr7\StreamWrapper\getResource().
Psr\Http\Message\StreamInterface::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. |
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, ZipStream\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\LimitStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\BufferStream, and GuzzleHttp\Psr7\CachingStream.
Referenced by GuzzleHttp\Psr7\InflateStream\__construct(), GuzzleHttp\Psr7\copy_to_stream(), GuzzleHttp\Psr7\copy_to_string(), GuzzleHttp\Psr7\InflateStream\getLengthOfPossibleFilenameHeader(), GuzzleHttp\Psr7\hash(), ILIAS\FileUpload\Processor\BlacklistFileHeaderPreProcessor\process(), ILIAS\FileUpload\Processor\WhitelistFileHeaderPreProcessor\process(), ZipStream\File\processStreamWithComputedHeader(), GuzzleHttp\Psr7\readline(), and ZipStream\File\readStream().
Psr\Http\Message\StreamInterface::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).
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, ZipStream\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\BufferStream, GuzzleHttp\Psr7\CachingStream, and ZipStream\DeflateStream.
Referenced by GuzzleHttp\Psr7\hash(), ILIAS\FileUpload\Processor\PreProcessorManagerImpl\process(), and ZipStream\File\processStreamWithComputedHeader().
Psr\Http\Message\StreamInterface::seek | ( | $offset, | |
$whence = SEEK_SET |
|||
) |
Seek to a position in the stream.
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\PumpStream, ZipStream\Stream, GuzzleHttp\Psr7\BufferStream, GuzzleHttp\Psr7\LimitStream, GuzzleHttp\Psr7\CachingStream, and GuzzleHttp\Psr7\NoSeekStream.
Referenced by GuzzleHttp\Psr7\hash().
Psr\Http\Message\StreamInterface::tell | ( | ) |
Returns the current position of the file read/write pointer.
Implemented in Slim\Http\Stream, GuzzleHttp\Psr7\Stream, ILIAS\Filesystem\Stream\Stream, ZipStream\Stream, GuzzleHttp\Psr7\LimitStream, GuzzleHttp\Psr7\AppendStream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\BufferStream, and GuzzleHttp\Psr7\PumpStream.
Referenced by GuzzleHttp\Psr7\CachingStream\cacheEntireStream(), GuzzleHttp\Psr7\hash(), GuzzleHttp\Psr7\CachingStream\seek(), and GuzzleHttp\Psr7\CachingStream\write().
Psr\Http\Message\StreamInterface::write | ( | $string | ) |
Write data to the stream.
string | $string | The string that is to be written. |
Implemented in Slim\Http\Stream, ILIAS\Filesystem\Stream\Stream, GuzzleHttp\Psr7\Stream, GuzzleHttp\Psr7\AppendStream, ZipStream\Stream, GuzzleHttp\Psr7\FnStream, GuzzleHttp\Psr7\BufferStream, GuzzleHttp\Psr7\PumpStream, GuzzleHttp\Psr7\CachingStream, and GuzzleHttp\Psr7\DroppingStream.
Referenced by GuzzleHttp\Psr7\copy_to_stream().