ailixter / gears-pipeline
The project that gears pipelines.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ailixter/gears-pipeline
Requires
- php: ^7.1
This package is auto-updated.
Last update: 2025-10-08 08:20:58 UTC
README
The project that gears pipelines.
it runs a chain of handlers over iterables (iterators, generators, arrays). the processing is memory efficient, no intermediate arrays are used.
echo PipelinedIteration::over( [1, 2], [3, 4], [5, 6], [7, 8] ) ->map(function ($a, $b, $c, $d) { return [$a + $b, $c + $d]; }) ->reduce(function ($r, $x, $y) { return $r += $x * $y; }) ->getResult(); // 132
implemented handlers
map(callable)
filter(callable)
reduce(callable, mixed = 0)
find(callable)
some(callable)
every(callable)