PatternsObserverTrait.php

Observer Pattern Implementation

This is an observer implementation. It takes a publisher (subject/target) and can attach and detach itself from a publisher (reciprocal funtions exist in publisher objects as well) The main part of the observer pattern is the notify function. This function is called when the attached publisher changes state

Traits

ObserverTrait Observer Class - The basic minimal observer functionality