ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Global event handler. More...
Public Member Functions | |
__construct () | |
Constructor. More... | |
Protected Member Functions | |
initListeners () | |
Protected Attributes | |
$db | |
$listener | |
$logger | |
Global event handler.
The event handler delegates application events (not gui events) between components that trigger events and components that listen to events. A component is a module or a service.
The component that triggers an event calls the raise function of the event handler through the global instance ilAppEventHandler:
E.g. in ilObjUser->delete(): $ilAppEventHandler->raise("Services/User", "deleteUser", array("id" => ..., ...))
A listener has to subscribe to the events of another component. This currently is done here in the constructor, e.g. if the News service listens to the User service, add a $this->listener["Services/User"] = array("Services/News"); This information will go to xml files in the future.
A component has to implement a listener class that implements Services/EventHandling/interfaces/interface.ilAppEventListener.php
The location must be <component>/classes/class.il<comp_name>AppEventListener.php, e.g. ./Services/News/classes/class.ilNewsAppEventListener.php
The class name must be il<comp_name>AppEventListener.
Definition at line 58 of file class.ilAppEventHandler.php.
ilAppEventHandler::__construct | ( | ) |
Constructor.
Definition at line 75 of file class.ilAppEventHandler.php.
References $DIC, ilLoggerFactory\getLogger(), and initListeners().
Referenced by initListeners().
|
protected |
Definition at line 85 of file class.ilAppEventHandler.php.
References $db, $ilDB, $listener, $name, $res, $row, __construct(), ilGlobalCache\COMP_EVENTS, ilPluginAdmin\getActivePlugins(), ilPluginAdmin\getActivePluginsForSlot(), ilGlobalCache\getInstance(), and ilPluginAdmin\getPluginObject().
Referenced by __construct().
|
protected |
Definition at line 63 of file class.ilAppEventHandler.php.
Referenced by initListeners().
|
protected |
Definition at line 65 of file class.ilAppEventHandler.php.
Referenced by initListeners().
|
protected |
Definition at line 70 of file class.ilAppEventHandler.php.