2017 © Pedro Peláez
 

library swoole

RxPHP Swoole

image

rx/swoole

RxPHP Swoole

  • Thursday, April 19, 2018
  • by davidwdan
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

RxPHP Swoole

This project allows you to use RxPHP with Swoole., (*1)

Installation

First, install swoole, (*2)

Then add rx/swoole to your project with composer:, (*3)

    composer require rx/swoole

It bootstraps a swoole scheduler for you, so you can do things like:, (*4)

  \Rx\Observable::interval(1000)
    ->take(5)
    ->subscribe(function($i){
      echo $i, PHP_EOL;
    });

Use with other Swoole modules

A small number of Swoole modules have helper Rx wrappers in this library. You can use these to combine into more complex examples:, (*5)


// this example uses the rx/operator-extras package for `cut` $file = \Rx\Swoole\Async::read(__DIR__ . '/url_list.txt'); $urlInfo = $file ->cut("\n") ->flatMap(function ($url) { return \Rx\Swoole\Http::get($url) ->map(function ($content) use ($url) { return $url . " is " . strlen($content) . " bytes.\n"; }); }); $urlInfo->subscribe(function ($info) { echo $info; });

The Versions

19/04 2018

dev-master

9999999-dev

RxPHP Swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

swoole rxphp reactivex rx.php

19/04 2018

0.0.2

0.0.2.0

RxPHP Swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

swoole rxphp reactivex rx.php

19/04 2018

0.0.1

0.0.1.0

RxPHP Swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Bonneau
by David Dan

swoole rxphp reactivex rx.php