You are here

public function StreamInterface::read in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/psr/http-message/src/StreamInterface.php \Psr\Http\Message\StreamInterface::read()

Read data from the stream.

Parameters

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.

Return value

string Returns the data read from the stream, or an empty string if no bytes are available.

Throws

\RuntimeException if an error occurs.

8 methods override StreamInterface::read()
AppendStream::read in vendor/guzzlehttp/psr7/src/AppendStream.php
Reads from all of the appended streams until the length is met or EOF.
BufferStream::read in vendor/guzzlehttp/psr7/src/BufferStream.php
Reads data from the buffer.
FnStream::read in vendor/guzzlehttp/psr7/src/FnStream.php
Read data from the stream.
PumpStream::read in vendor/guzzlehttp/psr7/src/PumpStream.php
Read data from the stream.
RelativeStream::read in vendor/zendframework/zend-diactoros/src/RelativeStream.php
Read data from the stream.

... See full list

File

vendor/psr/http-message/src/StreamInterface.php, line 134

Class

StreamInterface
Describes a data stream.

Namespace

Psr\Http\Message

Code

public function read($length);