start() 공개 정적인 메소드

Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence.
public static start ( callable $action, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable
$action callable
$scheduler rx\SchedulerInterface
리턴 Rx\Observable\AnonymousObservable
예제 #1
0
파일: StartTest.php 프로젝트: voryx/Rx.PHP
 /**
  * @test
  */
 public function start_with_error()
 {
     $error = new \Exception();
     $results = $this->scheduler->startWithCreate(function () use($error) {
         return Observable::start(function () use($error) {
             throw $error;
         }, $this->scheduler);
     });
     $this->assertMessages([onError(200, $error)], $results->getMessages());
 }