June 2017
Intermediate to advanced
536 pages
9h 49m
English
In our introduction example, we touched upon the observer pattern using \SplSubject and \SplObserver. Now, we are introducing an RxPHP observable and observer component. We might say that \SplSubject is analogous to Rx\Observable, whereas \SplObserver is analogous to Rx\Observer\CallbackObserver. The whole SPL and Rx, however, are only superficially analogous. Rx\Observable is more powerful than \SplObserver. We can think of Rx\Observable as a lazy source of event, a thing that produces value over time. Observables emit the following three types of events to their observers:
In a nutshell, it is a reactive data source that knows how to signal internal ...
Read now
Unlock full access