SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 183 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

The subject can initiate a notification (essentially an event),
which will cause the listeners to react to the event.
The expressions 'listener' and 'observer' are interchangeable, as are 'subject' and
'observable'.
If you are unfamiliar with the Observer pattern, you may want to refer to
http://www.phppatterns.com/docs/design/observer_pattern.
When we create plugins, we generally define listeners for specific events.
The application uses a global object called the event dispatcher to dispatch events to
registered listeners. The global event dispatcher, a JEventDispatcher object, extends
the abstract JObservable class.
Chapter 6
[ 137 ]
In Joomla! a listener can be a class or a function. When we use a class listener,
the class should extend the abstract class JPlugin; we extend this class because it
implements the methods that are used to attach the listener to a subject.
This diagram illustrates the relationship between the JEventDispatcher class and
listeners that extend the JPlugin class:
There are several events that are used in the core.


Pages:
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6