The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
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' );