Download the PHP package jotaelesalinas/php-mapreduce without Composer
On this page you can find all versions of the php package jotaelesalinas/php-mapreduce. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jotaelesalinas/php-mapreduce
More information about jotaelesalinas/php-mapreduce
Files in jotaelesalinas/php-mapreduce
Package php-mapreduce
Short Description A local implementation of the map-reduce strategy in PHP
License MIT
Homepage https://github.com/jotaelesalinas/php-mapreduce
Informations about the package php-mapreduce
php-mapreduce
PHP PSR-4 compliant library to easily do non-distributed local map-reduce.
Install
Via Composer
Basic usage
The output is:
Filters
The output is:
Groups
Group by the value of a field (valid for arrays and objects):
The output is:
Group by a custom value generated from each item:
The output is:
Input
MapReduce
accepts as input any data of type iterable
. That means, arrays and traversables, e.g. generators.
This is very handy when reading from big files that do not fit in memory.
Multiple inputs can be specified, passing several arguments to setInput()
, as long as all of them are iterable:
Output
MapReduce
can be configured to write the final data to one or more destinations.
Each destination has to be a Generator
:
Multiple outputs can be specified as well:
To help working with input and output generators, it is recommended to use the package jotaelesalinas/php-generators
, but it is not mandatory.
You can see more elaborated examples under the folder examples.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please DM me to @jotaelesalinas instead of using the issue tracker.
To do
- [ ] Add events to help see progress in large batches
- [ ] Add docs
- [ ] Insurance example
- [ ] adapt to new library
- [ ] add insured values
- [ ] improve kml output (info, markers)
Credits
- José Luis Salinas
- All Contributors
License
The MIT License (MIT). Please see License File for more information.