Phly\Http\Stream::rewind PHP Method

rewind() public method

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

Usage Example

Beispiel #1
0
 public function testRewindResetsToStartOfStream()
 {
     $this->tmpnam = tempnam(sys_get_temp_dir(), 'phly');
     file_put_contents($this->tmpnam, 'FOO BAR');
     $resource = fopen($this->tmpnam, 'wb+');
     $stream = new Stream($resource);
     $this->assertTrue($stream->seek(2));
     $stream->rewind();
     $this->assertEquals(0, $stream->tell());
 }
All Usage Examples Of Phly\Http\Stream::rewind