70 require_once(
'./Services/GlobalCache/classes/class.ilGlobalCache.php');
72 $cached_listeners = $ilGlobalCache->get(
'listeners');
73 if (is_array($cached_listeners)) {
74 $this->listener = $cached_listeners;
81 $this->listener = array();
83 $sql =
"SELECT * FROM il_event_handling".
84 " WHERE type = ".$ilDB->quote(
"listen",
"text");
85 $res = $ilDB->query($sql);
86 while(
$row = $ilDB->fetchAssoc(
$res))
88 $this->listener[
$row[
"id"]][] = $row[
"component"];
91 $ilGlobalCache->set(
'listeners', $this->listener);
103 function raise($a_component, $a_event, $a_parameter =
"")
105 if (is_array($this->listener[$a_component]))
107 foreach ($this->listener[$a_component] as
$listener)
110 $last_slash = strripos($listener,
'/');
111 $comp = substr($listener,0,$last_slash);
112 $class =
'il'.substr($listener,$last_slash + 1).
'AppEventListener';
113 $file =
"./".$listener.
"/classes/class.".$class.
".php";
116 #$comp = explode("/", $listener);
117 #$class = "il".$comp[1]."AppEventListener";
118 #$file = "./".$listener."/classes/class.".$class.".php";
124 call_user_func(array($class,
'handleEvent'), $a_component, $a_event, $a_parameter);
130 include_once(
"./Services/Component/classes/class.ilPluginAdmin.php");
132 foreach ($plugins as $pl)
136 $plugin->handleEvent($a_component, $a_event, $a_parameter);