2017 © Pedro Peláez
 

library pipes

The library for data flow processing

image

vkartaviy/pipes

The library for data flow processing

  • Sunday, November 18, 2012
  • by vkartaviy
  • Repository
  • 1 Watchers
  • 3 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Pipes

The library for data flow processing., (*1)

Build Status, (*2)

Here is a simple example:, (*3)

<?php

use Pipes\Iterator\Pipeline;
use Pipes\Iterator\Pipe\RenumberPipe;
use Pipes\Iterator\Pipe\TransformPipe;
use Pipes\Iterator\Pipe\DuplicateFilterPipe;
use Pipes\Iterator\Pipe\FilterPipe;

require __DIR__.'/../vendor/autoload.php';

$input = array(1, 1, 2, 2, 3, 3, 4, 4);

$pipeline = new Pipeline($input, array(
    new DuplicateFilterPipe(),
    new FilterPipe(function ($value) { return $value % 2 === 0; }),
    new TransformPipe(function ($value) { return $value / 2; }),
    new RenumberPipe()
));

foreach ($pipeline as $key => $value) {
    echo "{$key} => {$value}\n";
}

The Versions

18/11 2012

dev-master

9999999-dev https://github.com/vkartaviy/pipes

The library for data flow processing

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

pipeline pipes iterator-pipeline