org_heigl/trait-iterator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

org_heigl/trait-iterator

最新稳定版本:1.1.0

Composer 安装命令:

composer require org_heigl/trait-iterator

包简介

A Trait for the iterator-interface

README 文档

README

Often used implementation of the IteratorInterface

Installation

composer require org_heigl/trait-iterator

Usage

Add it to a class like this:

use Org_Heigl\IteratorTrait\IteratorTrait;

class MyList implements \Iterator
{
    use IteratorTrait;

    /** Can be an array or an Object implementing traversable */
    protected $yourArrayToIterateOver = [];

    public function & getIterableElement()
    {
        return $yourArrayToIterateOver
    }
}

The rest of the Iterator implementation is handled within the IteratorTrait.

Issues

Feel free to drop an issue on github when you need help.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-27