PHP Observers and Dispatchers
If you are looking at how to use the Observer or Dispatcher patterns in PHP 4 you should take a look at this article written by Peter Goodman. It is focused on PHP 4 however it is pretty good on the how and why when explaining the patterns. Peter also has some good code examples to walk you through the process of using the patterns.
If you are looking for a PHP 5 version of this, you can convert it simply by removing the reference characters and adding the abstract keyword to the abstract classes. You also need to add the __construct methods.
Peter’s blog is called The Unfraggable Bulk and once you see the site, the title becomes self explanatory. Pretty clever name if you ask me. Thanks for this article Peter and i look forward to whatever you post next.





