Amp\Emitter classEmitter

Emitter is a container for an iterator that can emit values using the emit() method and completed using the complete() and fail() methods of this object. The contained iterator may be accessed using the iterate() method. This object should not be part of a public API, but used internally to create and emit values to an iterator.

Summary

Properties

Methods

Properties

Methods

__construct —public function__construct()
No documentation.
iterate —public functioniterate():Amp\Promise
No documentation.
emit —public functionemit(mixed$value):Amp\Promise

Emits a value to the iterator.

Type Parameter Description Default Value
mixed $value No documentation. none
complete —public functioncomplete()

Completes the iterator.

fail —public functionfail(Throwable$reason)

Fails the iterator with the given reason.

Type Parameter Description Default Value
Throwable $reason No documentation. none
advance —public functionadvance():Amp\Promise

{@inheritdoc}

getCurrent —public functiongetCurrent()

{@inheritdoc}