| 1 | <?php |
||
| 4 | class ProgressiveStreamReader extends StreamReader{ |
||
| 5 | |||
| 6 | /** |
||
| 7 | */ |
||
| 8 | protected $source; |
||
| 9 | |||
| 10 | protected $dataLength = 0; |
||
| 11 | |||
| 12 | public function __construct($data = ''){ |
||
| 16 | |||
| 17 | public function setSource($source){ |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Read data from stream. |
||
| 23 | * |
||
| 24 | * NOTICE When $this->offset == strlen($this->data), substr() will return false. You'd better avoid call read() when $length == 0. |
||
| 25 | * |
||
| 26 | * @param int $length $length should be > 0. |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | protected function read($length) { |
||
| 42 | } |
||
| 43 |