Total Complexity | 9 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class ReadLineIterator implements IteratorAggregate |
||
12 | { |
||
13 | protected $path; |
||
14 | protected $bufferSize; |
||
15 | protected $offset; |
||
16 | |||
17 | /** |
||
18 | * 构建迭代器 |
||
19 | * |
||
20 | * @param string $path 路径 |
||
21 | * @param integer|null $offset 起始偏移 |
||
22 | * @param integer $bufferSize |
||
23 | */ |
||
24 | public function __construct(string $path, ?int $offset = 0, int $bufferSize = 1024) |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * 获取迭代器 |
||
33 | * |
||
34 | * @return Iterator |
||
35 | */ |
||
36 | public function getIterator():Iterator |
||
63 |