Gumbo_Interface_Observerable
Observer Pattern Interface, Observerable
The Observerable is responsible for sending updates to changes to it's state to any Observers. The Observerable contains important information to other objects in the program. If any changes are made, it will notify all it's Observers. It will define the information it passes, and the Observer is responsible for interpretting the data.
Author(s): |
Michael Luster <mluster79@yahoo.com> |
License: | New BSD License |
Copyright: | Copyright (c) 2007, iBayou, Michael Luster |
Link: | http://sourceforge.net/projects/phpgumbo |
Version: | 0.0.1 |
Interface Methods
Attaches (registers) an Observer to the Observerable
Parameter(s):
- (Gumbo_Interface_Observer) $obj
[ Top ]
Detach (unregister) an Observer from the Observerable
Parameter(s):
- (Gumbo_Interface_Observer) $obj
[ Top ]
Notifies the Observers about changes to the Observerable object state
The method will send data to the Observer through the Observer update method. The supplied arguments will be an array, consisting of a key=>value pairs with data the Observerable wants to pass. The Observer should provide implementation to parse this information into the necessary values. The Observerable class should define the type of array data it will be outputting, allowing an Observer to properly parse the information.
[ Top ]