Stream
class Stream implements StreamInterface (View source)
PSR-7 StreamInterface implementation
Largely "inspired" by laminas-diactoros implementation.
Constants
| DATA_INPUT_RAW |
|
| DATA_INPUT_URLENCODED |
|
| DATA_INPUT_BASE64 |
|
Methods
static StreamInterface
createFromData(string $data, string $dataEncoding = self::DATA_INPUT_RAW, string $mode = 'rb', string|MediaTypeInterface $mediaType = 'text/plain')
Create a Stream from binary data
static StreamInterface
createFromFile(string $filename, string $mode = 'r')
No description
__construct(resource $stream)
No description
getMetadata($key = null)
No description
isSeekable()
No description
read($length)
No description
tell()
No description
isWritable()
No description
seek($offset, $whence = SEEK_SET)
No description
__toString()
No description
getSize()
No description
rewind()
No description
detach()
No description
getContents()
No description
close()
No description
eof()
No description
write($string)
No description
isReadable()
No description
static
isValidResource($resource)
No description
Details
at line 39
static StreamInterface
createFromData(string $data, string $dataEncoding = self::DATA_INPUT_RAW, string $mode = 'rb', string|MediaTypeInterface $mediaType = 'text/plain')
Create a Stream from binary data