This chapter has focused mainly on the practical usage of RxPHP in combination with typical non-reactive code, and presented a different approach to existing event-based solutions.
Specifically, we stumbled across Error handling in Observable chains with retry()
, RetryWhen()
, and catch()
operators. We combined Observables with the concat()
, merge()
, and concatMap()
operator. We used Subjects to dynamically create Observable chains and manually emit values. You were also given an introduction to the Symfony EventDispatcher
component, with a series of examples presenting how the default EventDispatcher
class that comes out of the box can be used. We extended and partially rewrote the EventDispatcher
class and created ReactiveEventDispatcher
, which adds support for Observables. And lastly, we reused examples for EventDispatcher
with ReactiveEventDispatcher
to demonstrate that our implementation can work as a drop-in replacement.
The Symfony EventDispatcher
component serves as an easily...