You are here

public function Stream::read in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::read()
  2. 8 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::read()
  3. 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream::read()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream::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/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php, line 82

Class

Stream
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Fixtures

Code

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