Inheritance: extends Evenement\EventEmitter, implements Clue\React\Redis\Client
Beispiel #1
0
 protected function waitFor(StreamingClient $client)
 {
     $this->assertTrue($client->isBusy());
     while ($client->isBusy()) {
         $this->loop->tick();
     }
 }
Beispiel #2
0
 /**
  * @param $name
  * @param $arguments
  * @return AnonymousObservable
  */
 public function __call($name, array $arguments = [])
 {
     $promise = $this->client->__call($name, $arguments);
     return Observable::defer(function () use($promise) {
         $subject = new AsyncSubject();
         $promise->then(function ($data) use($subject) {
             $subject->onNext($data);
             $subject->onCompleted();
         }, [$subject, "onError"]);
         return $subject;
     });
 }