alcamo/iterator
最新稳定版本:0.1.1
Composer 安装命令:
composer require alcamo/iterator
包简介
Iterator-related stuff
关键字:
README 文档
README
use alcamo\iterator\InputStreamLineIterator;
$iterator = new InputStreamLineIterator(fopen(__FILE__, 'r'));
foreach ($iterator as $line => $data) {
printf("%3d %s\n", $line, $data);
}
This will output its own source file with line numbers.
Provided classes and traits
IteratorCurrentTraitprovides a partial implementation of theIteratorinterface so that a class using this trait just needs to implement the methodsrewind()andnext().InputStreamLineIteratoris an iterator class that reads lines from an input stream. Flags can be given e.g. to skip empty lines. Derived classes can easily add other features such as skipping comment lines.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-10-22