Class for handling and dispatching system and user defined events.
| package |
CMS |
|---|---|
| license |
GPL |
| deprecated |
CreateEvent(string $modulename, string $eventname)
string $modulenameThe name of the module that is sending the event
string $eventnameThe name of the event
RemoveEvent(string $modulename, string $eventname)
This function removes all handlers to the event, and completely removes all references to this event from the database
Note, only events created by this module can be removed.
string $modulenameThe name of the module that is sending the event
string $eventnameThe name of the event
SendEvent(string $modulename, string $eventname, array $params = array())
This function will call all registered event handlers for the event
string $modulenameThe name of the module that is sending the event
string $eventnameThe name of the event
array $paramsThe parameters associated with this event.
AddEventHandler(string $modulename, string $eventname, string $tag_name = false, string $module_handler = false, boolean $removable = true) : boolean
string $modulenameThe name of the module sending the event
string $eventnameThe name of the event
string $tag_nameThe name of a user defined tag. If not passed, no user defined tag is set.
string $module_handlerThe name of the module. If not passed, no module is set.
boolean $removableCan this event be removed from the list? Defaults to true.
boolean
If successful, true. If it fails, false.
RemoveEventHandler(string $modulename, string $eventname, string $tag_name = false, string $module_handler = false) : boolean
string $modulenameThe name of the module sending the event
string $eventnameThe name of the event
string $tag_nameThe name of a user defined tag. If not passed, no user defined tag is set.
string $module_handlerThe name of the module. If not passed, no module is set.
boolean
If successful, true. If it fails, false.