PHP Interface Amp\Observable

Inheritance: extends Interop\Async\Promise
Afficher le fichier Open project: amphp/amp Interface Usage Examples

Méthodes publiques

Méthode 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 méthode

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.