From Joomla! Documentation
Revision as of 20:17, 4 July 2013 by Tom Hutchison
[Edit Descripton] JObservable is an abstract class which allows you to simply implement a Observer/Observable pattern within an application.
In order to avoid strong dependencies between objects, which reduces reusability of the individual classes, it is common to use the Observer/Observable design pattern. The JObservable class can be used where one or more objects need to be informed when the state of another object changes. Objects derived from the JObserver class can register themselves with an object derived from the JObservable class and will be informed as required.
|getState||Get the state of the JObservable object|
|notify||Update each attached observer object and return an array of their return values|
|attach||Attach an observer object|
|detach||Detach an observer object|
jimport( 'joomla.base.observable' );