public function Stream::getContents in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::getContents()
- 8 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::getContents()
- 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream::getContents()
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::getContents()
Returns the remaining contents in a string
Return value
string
Throws
\RuntimeException if unable to read or an error occurs while reading.
Overrides StreamInterface::getContents
File
- vendor/
guzzlehttp/ psr7/ src/ Stream.php, line 100
Class
- Stream
- PHP stream implementation.
Namespace
GuzzleHttp\Psr7Code
public function getContents() {
$contents = stream_get_contents($this->stream);
if ($contents === false) {
throw new \RuntimeException('Unable to read stream contents');
}
return $contents;
}