PHPackages                             org\_heigl/trait-iterator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. org\_heigl/trait-iterator

ActiveLibrary

org\_heigl/trait-iterator
=========================

A Trait for the iterator-interface

1.1.0(9y ago)16.1k↓100%11MITPHP

Since Mar 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/heiglandreas/IteratorTrait)[ Packagist](https://packagist.org/packages/org_heigl/trait-iterator)[ RSS](/packages/org-heigl-trait-iterator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

IteratorTrait
=============

[](#iteratortrait)

Often used implementation of the IteratorInterface

Installation
------------

[](#installation)

```
composer require org_heigl/trait-iterator
```

Usage
-----

[](#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
------

[](#issues)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~185 days

Total

2

Last Release

3510d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ae5183aaad2bc7453230704bd6991dc6ccbcd6e775c6a29efdc94350a69f247?d=identicon)[heiglandreas](/maintainers/heiglandreas)

---

Top Contributors

[![heiglandreas](https://avatars.githubusercontent.com/u/91998?v=4)](https://github.com/heiglandreas "heiglandreas (8 commits)")

---

Tags

interfacetraititerator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/org-heigl-trait-iterator/health.svg)

```
[![Health](https://phpackages.com/badges/org-heigl-trait-iterator/health.svg)](https://phpackages.com/packages/org-heigl-trait-iterator)
```

###  Alternatives

[phpunit/php-file-iterator

FilterIterator implementation that filters files based on a list of suffixes.

7.5k879.3M72](/packages/phpunit-php-file-iterator)[nette/robot-loader

🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.

89152.7M321](/packages/nette-robot-loader)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39221.1M134](/packages/graham-campbell-manager)[ondram/ci-detector

Detect continuous integration environment and provide unified access to properties of current build

22249.4M33](/packages/ondram-ci-detector)[amphp/pipeline

Asynchronous iterators and operators.

7432.7M34](/packages/amphp-pipeline)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
