定制 alcamo/iterator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alcamo/iterator

最新稳定版本:0.1.2

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

  • IteratorCurrentTrait provides a partial implementation of the Iterator interface so that a class using this trait just needs to implement the methods rewind() and next().
  • InputStreamLineIterator is 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.
  • FnmatchFilterIterator is a filter iterator that filters filenames using fnmatch().

统计信息

  • 总下载量: 74
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-10-22