PHP Class Rx\Observable

Inheritance: implements rx\ObservableInterface
显示文件 Open project: ReactiveX/RxPHP Class Usage Examples

Protected Properties

Property Type Description
$observers
$started

Public Methods

Method Description
asObservable ( ) : Rx\Observable\AnonymousObservable Hides the identity of an observable sequence.
average ( ) : Rx\Observable\AnonymousObservable Computes the average of an observable sequence of values.
bufferWithCount ( $count, integer $skip = null ) : Rx\Observable\AnonymousObservable Projects each element of an observable sequence into zero or more buffers which are produced based on element count information.
catchError ( callable $selector ) : Rx\Observable\AnonymousObservable Continues an observable sequence that is terminated by an exception with the next observable sequence.
combineLatest ( array $observables, callable $selector = null ) : Rx\Observable\AnonymousObservable Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. Observables need to be an array.
concat ( rx\ObservableInterface $observable ) : Rx\Observable\AnonymousObservable Concatenate an observable sequence onto the end of the source observable.
concatAll ( ) : Rx\Observable\AnonymousObservable Concatenates a sequence of observable sequences into a single observable sequence.
concatMap ( callable $selector, callable $resultSelector = null ) : Rx\Observable\AnonymousObservable Projects each element of an observable sequence to an observable sequence and concatenates the resulting observable sequences into one observable sequence.
concatMapTo ( rx\ObservableInterface $observable, callable $resultSelector = null ) : Rx\Observable\AnonymousObservable Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence.
count ( callable $predicate = null ) : Rx\Observable\AnonymousObservable Returns an observable sequence containing a value that represents how many elements in the specified observable sequence satisfy a condition if provided, else the count of items.
create ( callable $subscribeAction ) : Rx\Observable\AnonymousObservable Creates an observable sequence from a specified subscribeAction callable implementation.
defaultIfEmpty ( rx\ObservableInterface $observable ) : Rx\Observable\AnonymousObservable Returns the specified value of an observable if the sequence is empty.
defer ( callable $factory ) : Rx\Observable\AnonymousObservable Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes.
delay ( $delay, rx\SchedulerInterface | null $scheduler = null ) : Rx\Observable\AnonymousObservable Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved.
dematerialize ( ) : Rx\Observable\AnonymousObservable Dematerializes the explicit notification values of an observable sequence as implicit notifications.
distinct ( callable $comparer = null ) : Rx\Observable\AnonymousObservable Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
distinctKey ( callable $keySelector, callable $comparer = null ) : Rx\Observable\AnonymousObservable Variant of distinct that takes a key selector
distinctUntilChanged ( callable $comparer = null ) : Rx\Observable\AnonymousObservable A variant of distinct that only compares emitted items from the source Observable against their immediate predecessors in order to determine whether or not they are distinct.
distinctUntilKeyChanged ( callable $keySelector = null, callable $comparer = null ) : Rx\Observable\AnonymousObservable Variant of distinctUntilChanged that takes a key selector and the comparer.
doOnCompleted ( callable $onCompleted ) : Rx\Observable\AnonymousObservable
doOnEach ( rx\ObserverInterface $observer ) : Rx\Observable\AnonymousObservable Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence.
doOnError ( callable $onError ) : Rx\Observable\AnonymousObservable
doOnNext ( callable $onNext ) : Rx\Observable\AnonymousObservable
emptyObservable ( ) : Rx\Observable\EmptyObservable Returns an empty observable sequence.
error ( Exception $error ) : Rx\Observable\ErrorObservable Returns an observable sequence that terminates with an exception.
filter ( callable $predicate ) : Rx\Observable\AnonymousObservable Emit only those items from an Observable that pass a predicate test.
flatMap ( callable $selector ) : Rx\Observable\AnonymousObservable Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
flatMapLatest ( callable $selector, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.
flatMapTo ( rx\ObservableInterface $observable ) : Rx\Observable\AnonymousObservable Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence.
fromArray ( array $array ) : Rx\Observable\ArrayObservable Converts an array to an observable sequence
fromIterator ( Iterator $iterator ) : IteratorObservable Converts an Iterator into an observable sequence
groupBy ( callable $keySelector, callable $elementSelector = null, callable $keySerializer = null ) : Rx\Observable\AnonymousObservable Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
groupByUntil ( callable $keySelector, callable $elementSelector = null, callable $durationSelector = null, callable $keySerializer = null ) : Rx\Observable\AnonymousObservable Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
interval ( $interval, rx\SchedulerInterface | null $scheduler = null ) : Rx\Observable\IntervalObservable Returns an Observable that emits an infinite sequence of ascending integers starting at 0, with a constant interval of time of your choosing between emissions.
just ( mixed $value ) : Rx\Observable\AnonymousObservable Returns an observable sequence that contains a single element.
lift ( callable $operatorFactory ) : Rx\Observable\AnonymousObservable Lifts a function to the current Observable and returns a new Observable that when subscribed to will pass the values of the current Observable through the Operator function.
map ( callable $selector ) : Rx\Observable\AnonymousObservable Takes a transforming function that operates on each element.
mapTo ( $value ) : Rx\Observable\AnonymousObservable Maps every value to the same value every time
mapWithIndex ( callable $selector ) : Rx\Observable\AnonymousObservable Maps operator variant that calls the map selector with the index and value
materialize ( ) : Rx\Observable\AnonymousObservable Materializes the implicit notifications of an observable sequence as explicit notifications.
max ( callable $comparer = null ) : Rx\Observable\AnonymousObservable Returns the maximum value in an observable sequence according to the specified comparer.
merge ( rx\ObservableInterface $otherObservable ) : Rx\Observable\AnonymousObservable Combine an Observable together with another Observable by merging their emissions into a single Observable.
mergeAll ( rx\ObservableInterface $sources ) : Rx\Observable\AnonymousObservable Merges an observable sequence of observables into an observable sequence.
min ( callable $comparer = null ) : Rx\Observable\AnonymousObservable Returns the minimum value in an observable sequence according to the specified comparer.
multicast ( Rx\Subject\Subject $subject, null $selector = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay.
multicastWithSelector ( callable $subjectSelector, null $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable Multicasts the source sequence notifications through an instantiated subject from a subject selector factory, into all uses of the sequence within a selector function. Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation.
never ( ) : Rx\Observable\NeverObservable Returns a non-terminating observable sequence, which can be used to denote an infinite duration.
partition ( callable $predicate ) : Rx\Observable\AnonymousObservable[] Returns two observables which partition the observations of the source by the given function.
pluck ( mixed $property ) : Observable Returns an Observable containing the value of a specified array index (if array) or property (if object) from all elements in the Observable sequence. If a property can't be resolved the observable will error.
publish ( callable $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence.
publishLast ( callable $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification.
publishValue ( mixed $initialValue, callable $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue.
race ( array $observables ) : Rx\Observable\AnonymousObservable Propagates the observable sequence that reacts first. Also known as 'amb'.
range ( $start, $count, rx\SchedulerInterface $scheduler = null ) : RangeObservable Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages.
reduce ( callable $accumulator, mixed $seed = null ) : Rx\Observable\AnonymousObservable Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence.
removeObserver ( rx\ObserverInterface $observer )
repeat ( integer $count ) : Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable Generates an observable sequence that repeats the given element the specified number of times.
repeatWhen ( callable $notifier ) : Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable Returns an Observable that emits the same values as the source Observable with the exception of an onCompleted.
replay ( callable $selector = null, integer | null $bufferSize = null, integer | null $windowSize = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer.
retry ( integer $retryCount ) : Rx\Observable\AnonymousObservable Repeats the source observable sequence the specified number of times or until it successfully terminates.
retryWhen ( callable $notifier ) : Rx\Observable\AnonymousObservable Repeats the source observable sequence on error when the notifier emits a next value. If the source observable errors and the notifier completes, it will complete the source sequence.
scan ( callable $accumulator, null $seed = null ) : Rx\Observable\AnonymousObservable Applies an accumulator function over an observable sequence and returns each intermediate result.
select ( callable $selector ) : Rx\Observable\AnonymousObservable Alias for Map
selectMany ( $selector ) : Rx\Observable\AnonymousObservable Alias for flatMap
share ( ) : Rx\Observable\RefCountObservable Returns an observable sequence that shares a single subscription to the underlying sequence.
shareReplay ( integer $bufferSize, integer $windowSize = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\RefCountObservable Returns an observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer.
shareValue ( $initialValue ) : Rx\Observable\RefCountObservable Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue.
skip ( integer $count ) : Rx\Observable\AnonymousObservable
skipLast ( integer $count ) : Rx\Observable\AnonymousObservable Bypasses a specified number of elements at the end of an observable sequence.
skipUntil ( rx\ObservableInterface $other ) : Rx\Observable\AnonymousObservable Returns the values from the source observable sequence only after the other observable sequence produces a value.
skipWhile ( callable $predicate ) : Rx\Observable\AnonymousObservable Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.
skipWhileWithIndex ( callable $predicate ) : Rx\Observable\AnonymousObservable Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.
start ( callable $action, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence.
startWith ( mixed $startValue ) : Rx\Observable\AnonymousObservable Prepends a value to an observable sequence with an argument of a signal value to prepend.
startWithArray ( array $startArray ) : Rx\Observable\AnonymousObservable Prepends a sequence of values to an observable sequence with an argument of an array of values to prepend.
subscribe ( rx\ObserverInterface $observer, $scheduler = null )
subscribeCallback ( callable $onNext = null, callable $onError = null, callable $onCompleted = null, rx\SchedulerInterface $scheduler = null )
subscribeOn ( rx\SchedulerInterface $scheduler ) : Rx\Observable\AnonymousObservable Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler.
sum ( ) : Rx\Observable\AnonymousObservable Computes the sum of a sequence of values
switchFirst ( ) : Rx\Observable\AnonymousObservable Receives an Observable of Observables and propagates the first Observable exclusively until it completes before it begins subscribes to the next Observable. Observables that come before the current Observable completes will be dropped and will not propagate.
switchLatest ( rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
take ( integer $count ) : Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable Returns a specified number of contiguous elements from the start of an observable sequence
takeLast ( $count ) : Rx\Observable\AnonymousObservable Returns a specified number of contiguous elements from the end of an observable sequence.
takeUntil ( rx\ObservableInterface $other ) : Rx\Observable\AnonymousObservable Returns the values from the source observable sequence until the other observable sequence produces a value.
takeWhile ( callable $predicate ) : Rx\Observable\AnonymousObservable Returns elements from an observable sequence as long as a specified condition is true. It takes as a parameter a a callback to test each source element for a condition. The callback predicate is called with the value of the element.
takeWhileWithIndex ( callable $predicate ) : Rx\Observable\AnonymousObservable Returns elements from an observable sequence as long as a specified condition is true. It takes as a parameter a a callback to test each source element for a condition. The callback predicate is called with the index and the value of the element.
throttle ( $throttleDuration, null $scheduler = null ) : Rx\Observable\AnonymousObservable Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration.
timeout ( $timeout, rx\ObservableInterface $timeoutObservable = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable
timer ( integer $dueTime, rx\SchedulerInterface $scheduler = null ) : TimerObservable Returns an observable sequence that produces a value after dueTime has elapsed.
timestamp ( rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable Records the timestamp for each value in an observable sequence.
toArray ( ) : Rx\Observable\AnonymousObservable Creates an observable sequence containing a single element which is an array containing all the elements of the source sequence.
where ( callable $predicate ) : Rx\Observable\AnonymousObservable Alias for filter
zip ( array $observables, callable $selector = null ) : Rx\Observable\AnonymousObservable Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. If the result selector function is omitted, a list with the elements of the observable sequences at corresponding indexes will be yielded.

Method Details

asObservable() public method

Hides the identity of an observable sequence.
public asObservable ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable An observable sequence that hides the identity of the source sequence.

average() public method

Computes the average of an observable sequence of values.
public average ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable

bufferWithCount() public method

Projects each element of an observable sequence into zero or more buffers which are produced based on element count information.
public bufferWithCount ( $count, integer $skip = null ) : Rx\Observable\AnonymousObservable
$count
$skip integer
return Rx\Observable\AnonymousObservable

catchError() public method

Continues an observable sequence that is terminated by an exception with the next observable sequence.
public catchError ( callable $selector ) : Rx\Observable\AnonymousObservable
$selector callable
return Rx\Observable\AnonymousObservable

combineLatest() public method

If the result selector is omitted, a list with the elements will be yielded.
public combineLatest ( array $observables, callable $selector = null ) : Rx\Observable\AnonymousObservable
$observables array
$selector callable
return Rx\Observable\AnonymousObservable

concat() public method

Concatenate an observable sequence onto the end of the source observable.
public concat ( rx\ObservableInterface $observable ) : Rx\Observable\AnonymousObservable
$observable rx\ObservableInterface
return Rx\Observable\AnonymousObservable

concatAll() public method

Concatenates a sequence of observable sequences into a single observable sequence.
public concatAll ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable The observable sequence that merges the elements of the inner sequences.

concatMap() public method

Projects each element of an observable sequence to an observable sequence and concatenates the resulting observable sequences into one observable sequence.
public concatMap ( callable $selector, callable $resultSelector = null ) : Rx\Observable\AnonymousObservable
$selector callable A transform function to apply to each element from the source sequence onto. The selector is called with the following information: - the value of the element - the index of the element - the Observable object being subscribed
$resultSelector callable A transform function to apply to each element of the intermediate sequence. The resultSelector is called with the following information: - the value of the outer element - the value of the inner element - the index of the outer element - the index of the inner element
return Rx\Observable\AnonymousObservable - An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element.

concatMapTo() public method

Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence.
public concatMapTo ( rx\ObservableInterface $observable, callable $resultSelector = null ) : Rx\Observable\AnonymousObservable
$observable rx\ObservableInterface - An an observable sequence to project each element from the source sequence onto.
$resultSelector callable A transform function to apply to each element of the intermediate sequence. The resultSelector is called with the following information: - the value of the outer element - the value of the inner element - the index of the outer element - the index of the inner element
return Rx\Observable\AnonymousObservable An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element.

count() public method

Returns an observable sequence containing a value that represents how many elements in the specified observable sequence satisfy a condition if provided, else the count of items.
public count ( callable $predicate = null ) : Rx\Observable\AnonymousObservable
$predicate callable
return Rx\Observable\AnonymousObservable

create() public static method

Creates an observable sequence from a specified subscribeAction callable implementation.
public static create ( callable $subscribeAction ) : Rx\Observable\AnonymousObservable
$subscribeAction callable Implementation of the resulting observable sequence's subscribe method.
return Rx\Observable\AnonymousObservable The observable sequence with the specified implementation for the subscribe method.

defaultIfEmpty() public method

Returns the specified value of an observable if the sequence is empty.
public defaultIfEmpty ( rx\ObservableInterface $observable ) : Rx\Observable\AnonymousObservable
$observable rx\ObservableInterface
return Rx\Observable\AnonymousObservable

defer() public static method

Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes.
public static defer ( callable $factory ) : Rx\Observable\AnonymousObservable
$factory callable
return Rx\Observable\AnonymousObservable

delay() public method

Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved.
public delay ( $delay, rx\SchedulerInterface | null $scheduler = null ) : Rx\Observable\AnonymousObservable
$delay
$scheduler rx\SchedulerInterface | null
return Rx\Observable\AnonymousObservable

dematerialize() public method

Dematerializes the explicit notification values of an observable sequence as implicit notifications.
public dematerialize ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable

distinct() public method

Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public distinct ( callable $comparer = null ) : Rx\Observable\AnonymousObservable
$comparer callable
return Rx\Observable\AnonymousObservable

distinctKey() public method

Variant of distinct that takes a key selector
public distinctKey ( callable $keySelector, callable $comparer = null ) : Rx\Observable\AnonymousObservable
$keySelector callable
$comparer callable
return Rx\Observable\AnonymousObservable

distinctUntilChanged() public method

A variant of distinct that only compares emitted items from the source Observable against their immediate predecessors in order to determine whether or not they are distinct.
public distinctUntilChanged ( callable $comparer = null ) : Rx\Observable\AnonymousObservable
$comparer callable
return Rx\Observable\AnonymousObservable

distinctUntilKeyChanged() public method

Variant of distinctUntilChanged that takes a key selector and the comparer.
public distinctUntilKeyChanged ( callable $keySelector = null, callable $comparer = null ) : Rx\Observable\AnonymousObservable
$keySelector callable
$comparer callable
return Rx\Observable\AnonymousObservable

doOnCompleted() public method

public doOnCompleted ( callable $onCompleted ) : Rx\Observable\AnonymousObservable
$onCompleted callable
return Rx\Observable\AnonymousObservable

doOnEach() public method

This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. When using doOnEach, it is important to note that the Observer may receive additional events after a stream has completed or errored (such as when useing a repeat or resubscribing). If you are using an Observable that extends the AbstractObservable, you will not receive these events. For this special case, use the DoObserver. doOnNext, doOnError, and doOnCompleted uses the DoObserver internally and will receive these additional events.
public doOnEach ( rx\ObserverInterface $observer ) : Rx\Observable\AnonymousObservable
$observer rx\ObserverInterface
return Rx\Observable\AnonymousObservable

doOnError() public method

public doOnError ( callable $onError ) : Rx\Observable\AnonymousObservable
$onError callable
return Rx\Observable\AnonymousObservable

doOnNext() public method

public doOnNext ( callable $onNext ) : Rx\Observable\AnonymousObservable
$onNext callable
return Rx\Observable\AnonymousObservable

emptyObservable() public static method

Returns an empty observable sequence.
public static emptyObservable ( ) : Rx\Observable\EmptyObservable
return Rx\Observable\EmptyObservable An observable sequence with no elements.

error() public static method

Returns an observable sequence that terminates with an exception.
public static error ( Exception $error ) : Rx\Observable\ErrorObservable
$error Exception
return Rx\Observable\ErrorObservable The observable sequence that terminates exceptionally with the specified exception object.

filter() public method

Emit only those items from an Observable that pass a predicate test.
public filter ( callable $predicate ) : Rx\Observable\AnonymousObservable
$predicate callable
return Rx\Observable\AnonymousObservable

flatMap() public method

Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
public flatMap ( callable $selector ) : Rx\Observable\AnonymousObservable
$selector callable
return Rx\Observable\AnonymousObservable

flatMapLatest() public method

Transform the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed Observable. The flatMapLatest operator is similar to the flatMap and concatMap methods described above, however, rather than emitting all of the items emitted by all of the Observables that the operator generates by transforming items from the source Observable, flatMapLatest instead emits items from each such transformed Observable only until the next such Observable is emitted, then it ignores the previous one and begins emitting items emitted by the new one.
public flatMapLatest ( callable $selector, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable
$selector callable - A transform function to apply to each source element.
$scheduler rx\SchedulerInterface
return Rx\Observable\AnonymousObservable - An observable sequence which transforms the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed Observable.

flatMapTo() public method

Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence.
public flatMapTo ( rx\ObservableInterface $observable ) : Rx\Observable\AnonymousObservable
$observable rx\ObservableInterface - An an observable sequence to project each element from the source sequence onto.
return Rx\Observable\AnonymousObservable

fromArray() public static method

Converts an array to an observable sequence
public static fromArray ( array $array ) : Rx\Observable\ArrayObservable
$array array
return Rx\Observable\ArrayObservable

fromIterator() public static method

Converts an Iterator into an observable sequence
public static fromIterator ( Iterator $iterator ) : IteratorObservable
$iterator Iterator
return Rx\Observable\IteratorObservable

groupBy() public method

Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
public groupBy ( callable $keySelector, callable $elementSelector = null, callable $keySerializer = null ) : Rx\Observable\AnonymousObservable
$keySelector callable
$elementSelector callable
$keySerializer callable
return Rx\Observable\AnonymousObservable

groupByUntil() public method

Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function.
public groupByUntil ( callable $keySelector, callable $elementSelector = null, callable $durationSelector = null, callable $keySerializer = null ) : Rx\Observable\AnonymousObservable
$keySelector callable
$elementSelector callable
$durationSelector callable
$keySerializer callable
return Rx\Observable\AnonymousObservable

interval() public static method

Returns an Observable that emits an infinite sequence of ascending integers starting at 0, with a constant interval of time of your choosing between emissions.
public static interval ( $interval, rx\SchedulerInterface | null $scheduler = null ) : Rx\Observable\IntervalObservable
$interval int Period for producing the values in the resulting sequence (specified as an integer denoting milliseconds).
$scheduler rx\SchedulerInterface | null
return Rx\Observable\IntervalObservable An observable sequence that produces a value after each period.

just() public static method

Returns an observable sequence that contains a single element.
public static just ( mixed $value ) : Rx\Observable\AnonymousObservable
$value mixed Single element in the resulting observable sequence.
return Rx\Observable\AnonymousObservable An observable sequence with the single element.

lift() public method

Lifts a function to the current Observable and returns a new Observable that when subscribed to will pass the values of the current Observable through the Operator function.
public lift ( callable $operatorFactory ) : Rx\Observable\AnonymousObservable
$operatorFactory callable
return Rx\Observable\AnonymousObservable

map() public method

Takes a transforming function that operates on each element.
public map ( callable $selector ) : Rx\Observable\AnonymousObservable
$selector callable
return Rx\Observable\AnonymousObservable

mapTo() public method

Maps every value to the same value every time
public mapTo ( $value ) : Rx\Observable\AnonymousObservable
$value
return Rx\Observable\AnonymousObservable

mapWithIndex() public method

Maps operator variant that calls the map selector with the index and value
public mapWithIndex ( callable $selector ) : Rx\Observable\AnonymousObservable
$selector callable
return Rx\Observable\AnonymousObservable

materialize() public method

Materializes the implicit notifications of an observable sequence as explicit notifications.
public materialize ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable

max() public method

Returns the maximum value in an observable sequence according to the specified comparer.
public max ( callable $comparer = null ) : Rx\Observable\AnonymousObservable
$comparer callable
return Rx\Observable\AnonymousObservable

merge() public method

Combine an Observable together with another Observable by merging their emissions into a single Observable.
public merge ( rx\ObservableInterface $otherObservable ) : Rx\Observable\AnonymousObservable
$otherObservable rx\ObservableInterface
return Rx\Observable\AnonymousObservable

mergeAll() public static method

Merges an observable sequence of observables into an observable sequence.
public static mergeAll ( rx\ObservableInterface $sources ) : Rx\Observable\AnonymousObservable
$sources rx\ObservableInterface
return Rx\Observable\AnonymousObservable

min() public method

Returns the minimum value in an observable sequence according to the specified comparer.
public min ( callable $comparer = null ) : Rx\Observable\AnonymousObservable
$comparer callable
return Rx\Observable\AnonymousObservable

multicast() public method

Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay.
public multicast ( Rx\Subject\Subject $subject, null $selector = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable
$subject Rx\Subject\Subject
$selector null
$scheduler rx\SchedulerInterface
return Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable

multicastWithSelector() public method

For specializations with fixed subject types, see Publish, PublishLast, and Replay.
public multicastWithSelector ( callable $subjectSelector, null $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable
$subjectSelector callable
$selector null
return Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable

never() public static method

Returns a non-terminating observable sequence, which can be used to denote an infinite duration.
public static never ( ) : Rx\Observable\NeverObservable
return Rx\Observable\NeverObservable An observable sequence whose observers will never get called.

partition() public method

The first will trigger observations for those values for which the predicate returns true. The second will trigger observations for those values where the predicate returns false. The predicate is executed once for each subscribed observer. Both also propagate all error observations arising from the source and each completes when the source completes.
public partition ( callable $predicate ) : Rx\Observable\AnonymousObservable[]
$predicate callable
return Rx\Observable\AnonymousObservable[]

pluck() public method

Returns an Observable containing the value of a specified array index (if array) or property (if object) from all elements in the Observable sequence. If a property can't be resolved the observable will error.
public pluck ( mixed $property ) : Observable
$property mixed
return Observable

publish() public method

This operator is a specialization of Multicast using a regular Subject.
public publish ( callable $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable
$selector callable
return Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable

publishLast() public method

This operator is a specialization of Multicast using a AsyncSubject.
public publishLast ( callable $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable
$selector callable
return Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable

publishValue() public method

This operator is a specialization of Multicast using a BehaviorSubject.
public publishValue ( mixed $initialValue, callable $selector = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable
$initialValue mixed
$selector callable
return Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable

race() public static method

Propagates the observable sequence that reacts first. Also known as 'amb'.
public static race ( array $observables ) : Rx\Observable\AnonymousObservable
$observables array
return Rx\Observable\AnonymousObservable

range() public static method

Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages.
public static range ( $start, $count, rx\SchedulerInterface $scheduler = null ) : RangeObservable
$start
$count
$scheduler rx\SchedulerInterface
return Rx\Observable\RangeObservable

reduce() public method

The specified seed value is used as the initial accumulator value.
public reduce ( callable $accumulator, mixed $seed = null ) : Rx\Observable\AnonymousObservable
$accumulator callable - An accumulator function to be invoked on each element.
$seed mixed [optional] - The initial accumulator value.
return Rx\Observable\AnonymousObservable - An observable sequence containing a single element with the final accumulator value.

removeObserver() public method

public removeObserver ( rx\ObserverInterface $observer )
$observer rx\ObserverInterface

repeat() public method

Generates an observable sequence that repeats the given element the specified number of times.
public repeat ( integer $count ) : Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable
$count integer
return Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable

repeatWhen() public method

An onCompleted notification from the source will result in the emission of a count item to the Observable provided as an argument to the notificationHandler function. If that Observable calls onComplete or onError then repeatWhen will call onCompleted or onError on the child subscription. Otherwise, this Observable will resubscribe to the source observable.
public repeatWhen ( callable $notifier ) : Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable
$notifier callable
return Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable

replay() public method

This operator is a specialization of Multicast using a ReplaySubject.
public replay ( callable $selector = null, integer | null $bufferSize = null, integer | null $windowSize = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable
$selector callable
$bufferSize integer | null
$windowSize integer | null
$scheduler rx\SchedulerInterface
return Rx\Observable\ConnectableObservable | Rx\Observable\MulticastObservable

retry() public method

If the retry count is not specified, it retries indefinitely. Note if you encounter an error and want it to retry once, then you must use ->retry(2).
public retry ( integer $retryCount ) : Rx\Observable\AnonymousObservable
$retryCount integer
return Rx\Observable\AnonymousObservable

retryWhen() public method

Repeats the source observable sequence on error when the notifier emits a next value. If the source observable errors and the notifier completes, it will complete the source sequence.
public retryWhen ( callable $notifier ) : Rx\Observable\AnonymousObservable
$notifier callable
return Rx\Observable\AnonymousObservable

scan() public method

The optional seed value is used as the initial accumulator value.
public scan ( callable $accumulator, null $seed = null ) : Rx\Observable\AnonymousObservable
$accumulator callable
$seed null
return Rx\Observable\AnonymousObservable

select() public method

Alias for Map
public select ( callable $selector ) : Rx\Observable\AnonymousObservable
$selector callable
return Rx\Observable\AnonymousObservable

selectMany() public method

Alias for flatMap
public selectMany ( $selector ) : Rx\Observable\AnonymousObservable
$selector
return Rx\Observable\AnonymousObservable

share() public method

This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
public share ( ) : Rx\Observable\RefCountObservable
return Rx\Observable\RefCountObservable An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

shareReplay() public method

This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
public shareReplay ( integer $bufferSize, integer $windowSize = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\RefCountObservable
$bufferSize integer
$windowSize integer
$scheduler rx\SchedulerInterface
return Rx\Observable\RefCountObservable

shareValue() public method

This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
public shareValue ( $initialValue ) : Rx\Observable\RefCountObservable
$initialValue
return Rx\Observable\RefCountObservable

skip() public method

public skip ( integer $count ) : Rx\Observable\AnonymousObservable
$count integer
return Rx\Observable\AnonymousObservable

skipLast() public method

This operator accumulates a queue with a length enough to store the first count elements. As more elements are received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed.
public skipLast ( integer $count ) : Rx\Observable\AnonymousObservable
$count integer Number of elements to bypass at the end of the source sequence.
return Rx\Observable\AnonymousObservable An observable sequence containing the source sequence elements except for the bypassed ones at the end.

skipUntil() public method

Returns the values from the source observable sequence only after the other observable sequence produces a value.
public skipUntil ( rx\ObservableInterface $other ) : Rx\Observable\AnonymousObservable
$other rx\ObservableInterface The observable sequence that triggers propagation of elements of the source sequence.
return Rx\Observable\AnonymousObservable An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation.

skipWhile() public method

Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.
public skipWhile ( callable $predicate ) : Rx\Observable\AnonymousObservable
$predicate callable A function to test each element for a condition.
return Rx\Observable\AnonymousObservable An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

skipWhileWithIndex() public method

Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.
public skipWhileWithIndex ( callable $predicate ) : Rx\Observable\AnonymousObservable
$predicate callable A function to test each element for a condition; the first parameter of the function represents the index of the source element, the second parameter is the value.
return Rx\Observable\AnonymousObservable An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

start() public static method

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
return Rx\Observable\AnonymousObservable

startWith() public method

Prepends a value to an observable sequence with an argument of a signal value to prepend.
public startWith ( mixed $startValue ) : Rx\Observable\AnonymousObservable
$startValue mixed
return Rx\Observable\AnonymousObservable

startWithArray() public method

Prepends a sequence of values to an observable sequence with an argument of an array of values to prepend.
public startWithArray ( array $startArray ) : Rx\Observable\AnonymousObservable
$startArray array
return Rx\Observable\AnonymousObservable

subscribe() public method

public subscribe ( rx\ObserverInterface $observer, $scheduler = null )
$observer rx\ObserverInterface

subscribeCallback() public method

public subscribeCallback ( callable $onNext = null, callable $onError = null, callable $onCompleted = null, rx\SchedulerInterface $scheduler = null )
$onNext callable
$onError callable
$onCompleted callable
$scheduler rx\SchedulerInterface

subscribeOn() public method

Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler.
public subscribeOn ( rx\SchedulerInterface $scheduler ) : Rx\Observable\AnonymousObservable
$scheduler rx\SchedulerInterface
return Rx\Observable\AnonymousObservable

sum() public method

Computes the sum of a sequence of values
public sum ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable

switchFirst() public method

This operator is similar to concatAll() except that it will not hold onto Observables that come in before the current one is finished completed.
public switchFirst ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable - An Observable sequence that is the result of concatenating non-overlapping items emitted by an Observable of Observables.

switchLatest() public method

Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
public switchLatest ( rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable
$scheduler rx\SchedulerInterface
return Rx\Observable\AnonymousObservable - The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.

take() public method

Returns a specified number of contiguous elements from the start of an observable sequence
public take ( integer $count ) : Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable
$count integer
return Rx\Observable\AnonymousObservable | Rx\Observable\EmptyObservable

takeLast() public method

Returns a specified number of contiguous elements from the end of an observable sequence.
public takeLast ( $count ) : Rx\Observable\AnonymousObservable
$count
return Rx\Observable\AnonymousObservable

takeUntil() public method

Returns the values from the source observable sequence until the other observable sequence produces a value.
public takeUntil ( rx\ObservableInterface $other ) : Rx\Observable\AnonymousObservable
$other rx\ObservableInterface - other Observable sequence that terminates propagation of elements of the source sequence.
return Rx\Observable\AnonymousObservable - An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation.

takeWhile() public method

Returns elements from an observable sequence as long as a specified condition is true. It takes as a parameter a a callback to test each source element for a condition. The callback predicate is called with the value of the element.
public takeWhile ( callable $predicate ) : Rx\Observable\AnonymousObservable
$predicate callable
return Rx\Observable\AnonymousObservable

takeWhileWithIndex() public method

Returns elements from an observable sequence as long as a specified condition is true. It takes as a parameter a a callback to test each source element for a condition. The callback predicate is called with the index and the value of the element.
public takeWhileWithIndex ( callable $predicate ) : Rx\Observable\AnonymousObservable
$predicate callable
return Rx\Observable\AnonymousObservable

throttle() public method

If items are emitted on the source observable prior to the expiration of the time period, the last item emitted on the source observable will be emitted.
public throttle ( $throttleDuration, null $scheduler = null ) : Rx\Observable\AnonymousObservable
$throttleDuration
$scheduler null
return Rx\Observable\AnonymousObservable

timeout() public method

public timeout ( $timeout, rx\ObservableInterface $timeoutObservable = null, rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable
$timeout
$timeoutObservable rx\ObservableInterface
$scheduler rx\SchedulerInterface
return Rx\Observable\AnonymousObservable

timer() public static method

Returns an observable sequence that produces a value after dueTime has elapsed.
public static timer ( integer $dueTime, rx\SchedulerInterface $scheduler = null ) : TimerObservable
$dueTime integer - milliseconds
$scheduler rx\SchedulerInterface
return Rx\Observable\TimerObservable

timestamp() public method

Records the timestamp for each value in an observable sequence.
public timestamp ( rx\SchedulerInterface $scheduler = null ) : Rx\Observable\AnonymousObservable
$scheduler rx\SchedulerInterface
return Rx\Observable\AnonymousObservable

toArray() public method

Creates an observable sequence containing a single element which is an array containing all the elements of the source sequence.
public toArray ( ) : Rx\Observable\AnonymousObservable
return Rx\Observable\AnonymousObservable An observable sequence containing a single element with a list containing all the elements of the source sequence.

where() public method

Alias for filter
public where ( callable $predicate ) : Rx\Observable\AnonymousObservable
$predicate callable
return Rx\Observable\AnonymousObservable

zip() public method

Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. If the result selector function is omitted, a list with the elements of the observable sequences at corresponding indexes will be yielded.
public zip ( array $observables, callable $selector = null ) : Rx\Observable\AnonymousObservable
$observables array
$selector callable
return Rx\Observable\AnonymousObservable

Property Details

$observers protected_oe property

protected $observers

$started protected_oe property

protected $started