Rx\Observable::concatMapTo PHP Method

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.
    public function concatMapTo(ObservableInterface $observable, callable $resultSelector = null)
    {
        return $this->concatMap(function () use($observable) {
            return $observable;
        }, $resultSelector);
    }