Rx\Observable::shareValue PHP Method

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
    public function shareValue($initialValue)
    {
        return $this->publishValue($initialValue)->refCount();
    }