A collection library as a container for aggregation of objects
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
benchmarks
src
tests
.coveralls.yml
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Emonkak\Collection

Build Status Coverage Status

A collection library as a container for aggregation of objects.

Requirements

Licence

MIT Licence

Example

// Take five elements from a infinite list of even numbers.
Collection::iterate(0, function($n) { return $n + 1; })
    ->filter(function($n) { return $n % 2 === 0; })
    ->take(5)
    ->each(function($n) { echo $n, PHP_EOL; });
// => 0
//    2
//    4
//    6
//    8

Documentation

Please see Wiki. (but wiki pages are Japanese only)