references:joomla.framework:base:jobserver-__constructTable of Contents
__construct
This is the class constructor. It performs two function: first, it registers itself with the subject so that the subject knows to notify this observer. Second, it sets up the subject property so that this object can reference the subject it is observing. SyntaxJObserver __construct ( &$subject )
ExamplesThe JEventDispatcher::register function instantiates a JObserver class (or subclass) by passing itself to the JObserver constructor: Example $this->attach(new $handler($this)); |


