Domraider / rxnet

PHP reactive network library, get the presentation slides
http://domraider.github.io/rxnet
MIT License
130 stars 15 forks source link

add produce next callback helper on OnDemand #57

Closed Alban-io closed 5 years ago

Alban-io commented 7 years ago

Whatever you can call produceNextCallback anywhere :

$reader = new \Rxnet\OnDemand\OnDemandFileReader("./test.csv");
$reader
    ->getObservable()
    ->doOnNext(function ($row) { echo "got row : {$row}" . PHP_EOL; })
    ->subscribeCallback($reader->produceNextCallback());

$reader->produceNext(1);