Skip to content

Commit 77ba53d

Browse files
committed
Added a rewind() definition
- per discussion with @Crell
1 parent 9fcf948 commit 77ba53d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/StreamableInterface.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ public function isSeekable();
8383
*/
8484
public function seek($offset, $whence = SEEK_SET);
8585

86+
/**
87+
* Seek to the beginning of the stream.
88+
*
89+
* If the stream is not seekable, this method will return FALSE, indicating
90+
* failure; otherwise, it will perform a seek(0), and return the status of
91+
* that operation.
92+
*
93+
* @return bool Returns TRUE on success or FALSE on failure.
94+
*/
95+
public function rewind();
96+
8697
/**
8798
* Returns whether or not the stream is writable.
8899
*

0 commit comments

Comments
 (0)