Support Joomla!

references:joomla.framework:base:jobservable-attach

Table of Contents

attach

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Base Class JObservable Method attach Reference attach() Never Work in Progress

This method is used to attach an observer object.

Syntax

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.

Examples

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));
 
references/joomla.framework/base/jobservable-attach.txt (549 views) · Last modified: 2007/08/15 15:08