| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Base |
JObservable |
attach |
attach() |
Never | Work in Progress |
This method is used to attach an observer object.
void attach ( $observer )
| $observer | object | is an object that is a child class of the JObserver class. There is no strict typing, but the class must have a member function called ‘update’. See the JObserver class for more information about the update function. |
The JEventDispatcher::register member function calls this method to attach event handlers to itself. It is called as follows:
Example
$this->attach(new $handler($this));