I just read a bit about the observer pattern in PHP.
I've read somewhere that the observed object should not be responsible for notifying the different observing objects, but rather the observed object should emit a single event to which the observing objects subscribe.
This way, the observed object does not need to keep track of the different observers, but rather should the observing objects register to the event.
Is there a way to achieve this in PHP?
I've read that the current way of implementing, is that the observed object keeps a reference to a dynamic array of observers.
It is not a problem, I just wonder if in PHP, something like an 'event emitter' exists.