You are here

public function Stream::rewind in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::rewind()
  2. 8.0 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::rewind()
  3. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream::rewind()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::rewind()

Seek to the beginning of the stream.

If the stream is not seekable, this method will raise an exception; otherwise, it will perform a seek(0).

@link http://www.php.net/manual/en/function.fseek.php

Throws

\RuntimeException on failure.

Overrides StreamInterface::rewind

See also

seek()

1 call to Stream::rewind()
Stream::__toString in vendor/zendframework/zend-diactoros/src/Stream.php
Reads all data from the stream into a string, from the beginning to end.

File

vendor/zendframework/zend-diactoros/src/Stream.php, line 175

Class

Stream
Implementation of PSR HTTP streams

Namespace

Zend\Diactoros

Code

public function rewind() {
  return $this
    ->seek(0);
}