Page 1 of 1

2 Responses

  1. Brad

    I realize that this is a trivial example, but the problem with this implementation of the Observer pattern is a lack of context in the SplObserver classes.

    From the Logger point of view, the subject must have a defined “exception” interface, which implies that the update method should either be doing type checking, or the Logger class should be a specific “ExceptionLogger” which possibly subclasses “Logger”

Leave a Reply