By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,666 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,666 IT Pros & Developers. It's quick & easy.

The Observer Pattern in PHP 5

P: n/a
Last week I continued my series of design patterns examples using PHP
5. Here now is my 14th example, the Observer pattern.

In the Observer Pattern, a Subject object notifies an Observer object
if it's the Subject object's state changes.

Pretty simple and fairly useful.

An application for this pattern might be having a Subject object with
the state of a web page, and an Observer object which can produce RSS
feeds. If the Subject page changes it notifies the Observer object,
which produces an RSS feed for the changed page.
May 8 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.