You are here

public function RelativeStream::read in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-diactoros/src/RelativeStream.php \Zend\Diactoros\RelativeStream::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.

Overrides StreamInterface::read

File

vendor/zendframework/zend-diactoros/src/RelativeStream.php, line 148

Class

RelativeStream
Class RelativeStream

Namespace

Zend\Diactoros

Code

public function read($length) {
  return $this->decoratedStream
    ->read($length);
}