PHP Interface Amp\Observable

Inheritance: extends Interop\Async\Promise
ファイルを表示 Open project: amphp/amp Interface Usage Examples

Public Methods

Method Description
subscribe ( callable $onNext ) Registers a callback to be invoked each time value is emitted from the observable. If the function returns an promise, back-pressure is applied to the promise until the returned promise is resolved.

Method Details

subscribe() public method

Exceptions thrown from $onNext (or failures of promises returned from $onNext) will fail the returned Subscriber with the thrown exception.
public subscribe ( callable $onNext )
$onNext callable Function invoked each time a value is emitted from the observable.