Phly\Http\Stream::rewind PHP 메소드

rewind() 공개 메소드

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

Usage Example

예제 #1
0
파일: StreamTest.php 프로젝트: phly/http
 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