File: LineIterator53.php Lines 10 to 29 |
|
10 | * <code> |
|
11 | * $it = LineIterator53::createByPath($filepath); |
|
12 | * foreach($it as $row) { |
|
13 | * // do something. |
|
14 | * } |
|
15 | * </code> |
|
16 | * @uses >= php-5.3 |
|
17 | * @version 0.1.0 |
|
18 | */ |
| | class LineIterator53 extends FileIterator53 |
|
20 | { |
|
21 | /** @var mixed scalar */ |
|
22 | protected $_key = -1; |
|
23 | |
|
24 | public function next() { |
|
25 | $this->_key++; |
|
26 | $this->buf = fgets($this->fp); |
|
27 | return $this->buf; |
|
28 | } |
|
29 | |
|