Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Commit 1f1ea02

Browse files
committed
Be compatible with readAll().
1 parent e7b3fed commit 1f1ea02

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Read.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,12 @@ public function readLine ( ) {
183183
* Read all, i.e. read as much as possible.
184184
*
185185
* @access public
186+
* @param int $offset Offset.
186187
* @return string
187188
*/
188-
public function readAll ( ) {
189+
public function readAll ( $offset = 0 ) {
189190

190-
return stream_get_contents($this->getStream());
191+
return stream_get_contents($this->getStream(), -1, $offset);
191192
}
192193

193194
/**

ReadWrite.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,12 @@ public function readLine ( ) {
191191
* Read all, i.e. read as much as possible.
192192
*
193193
* @access public
194+
* @param int $offset Offset.
194195
* @return string
195196
*/
196-
public function readAll ( ) {
197+
public function readAll ( $offset = 0 ) {
197198

198-
return stream_get_contents($this->getStream());
199+
return stream_get_contents($this->getStream(), -1, $offset);
199200
}
200201

201202
/**

0 commit comments

Comments
 (0)