emonkak / collection
A collection library as a container for aggregation of objects
Installs: 14 661
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 4
Forks: 1
Open Issues: 1
Requires
- php: >=5.4.0
Requires (Dev)
- athletic/athletic: ~0.1.8
- phpunit/phpunit: ~4.4.0
- satooshi/php-coveralls: dev-master
README
A collection library as a container for aggregation of objects.
Requirements
- PHP 5.4 or higher
- Composer
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)