PHPackages                             eastoriented/php-container - 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. eastoriented/php-container

ActiveLibrary

eastoriented/php-container
==========================

A PHP library to iterate over values in container

0270PHP

Since Oct 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/eastoriented/php-container)[ Packagist](https://packagist.org/packages/eastoriented/php-container)[ RSS](/packages/eastoriented-php-container/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

eastoriented/php-container [![Build Status](https://camo.githubusercontent.com/568671543d053b945d88e0dc10360e97ce4e5015269b26c403c33c410a0245d9/68747470733a2f2f7472617669732d63692e6f72672f656173746f7269656e7465642f7068702d636f6e7461696e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/eastoriented/php-container) [![Coverage Status](https://camo.githubusercontent.com/584dd44b214e2ac0065d7ded2cb5ac399e4c57fdd0973f80ec6e474131398708/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f656173746f7269656e7465642f7068702d636f6e7461696e65722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/eastoriented/php-container?branch=master)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#eastorientedphp-container--)

`eastoriented/php-container` is a east oriented PHP library to iterator over some values. All public methods in all classes return `void`.

How to use it?
--------------

[](#how-to-use-it)

The file `src/container.php` define the interface `eastoriented\php\container`.
The file `src/container/adt.php` define the interface `eastoriented\php\container\adt` (Abstract Data Type).
The file `src/iterator.php` define the interface `eastoriented\php\container\iterator`.
The file `src/iterator/block.php` define the interface `eastoriented\php\container\iterator\block`.
To iterate over a container, you need an iterator and a block, or you can use an abstract data type.

```
use eastoriented\php\{
	container,
	container\iterator,
	container\iterator\block
};

(new container\fromArray(1, null, false, true, new \stdclass, uniqid(), rand(PHP_INT_MIN, PHP_INT_MAX), M-PI))
	->blockForContainerIteratorIs(
		new iterator\fifo,
		new block\functor(
			function($value) { var_dump($value); }
		)
	)
;

(new container\adt\fifo(1, null, false, true, new \stdclass, uniqid(), rand(PHP_INT_MIN, PHP_INT_MAX), M-PI))
	->blockForEachValueIs(
		new block\functor(
			function($value) { var_dump($value); }
		)
	)
;

```

Contributing
------------

[](#contributing)

### About workflow

[](#about-workflow)

We're using pull request to introduce new features and bug fixes.
Please, try to be explicit in your commit messages:

1. Explain why the change was made ;
2. Explain technical implementation (you can provide links to any relevant tickets, articles or other resources).

You can use the following template:

```
# If applied, this commit will...

# Explain why this change is being made

# Provide links to any relevant tickets, articles or other resources

```

To use it, just put it in a text file in (for example) your home and define it as a template:

```
# git config --global commit.template ~/.git_commit_template.txt

```

### About testing

[](#about-testing)

To run unit tests, just do `make unit-tests`.

Languages and tools
-------------------

[](#languages-and-tools)

- [*atoum*](http://docs.atoum.org).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f5d8c29ba579eb1b08a260038385cf0f21752ac8bd13b65fe7c1f4f876a594d?d=identicon)[mageekguy](/maintainers/mageekguy)

---

Top Contributors

[![mageekguy](https://avatars.githubusercontent.com/u/457534?v=4)](https://github.com/mageekguy "mageekguy (14 commits)")

### Embed Badge

![Health badge](/badges/eastoriented-php-container/health.svg)

```
[![Health](https://phpackages.com/badges/eastoriented-php-container/health.svg)](https://phpackages.com/packages/eastoriented-php-container)
```

PHPackages © 2026

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