You are here

public function BufferStream::getContents in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/guzzlehttp/psr7/src/BufferStream.php \GuzzleHttp\Psr7\BufferStream::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

1 call to BufferStream::getContents()
BufferStream::__toString in vendor/guzzlehttp/psr7/src/BufferStream.php
Reads all data from the stream into a string, from the beginning to end.

File

vendor/guzzlehttp/psr7/src/BufferStream.php, line 36

Class

BufferStream
Provides a buffer stream that can be written to to fill a buffer, and read from to remove bytes from the buffer.

Namespace

GuzzleHttp\Psr7

Code

public function getContents() {
  $buffer = $this->buffer;
  $this->buffer = '';
  return $buffer;
}