Observer Design Pattern¶
The observer is an architectural pattern, where objects register to get notified when events happen to a specific object. It is also known as the listener pattern.
In PHP, there is a native interface call SplObserver, coupled with the SplSubject, to implement such pattern.
See also SplObserver, SplSubject, Events and Event Listeners, Observer Pattern In PHP 8+
Related : Design Pattern