49 if (!isset(self::$instance)) {
51 $cached_obj = $global_cache->get(
'ilCachedCtrl');
53 self::$instance = $cached_obj;
55 self::$instance =
new self();
56 $global_cache->set(
'ilCachedCtrl', self::$instance);
64 public static function flush() {
66 self::$instance = NULL;
86 $this->global_cache->set(
'ilCachedCtrl', $this);
91 protected function readFromDB() {
96 $set = $ilDB->query(
'SELECT module_class.*, LOWER(module_class.class) lower_class FROM module_class');
97 while ($rec = $ilDB->fetchAssoc($set)) {
98 $this->module_classes[$rec[
'lower_class']] = $rec;
100 $set = $ilDB->query(
'SELECT service_class.*, LOWER(service_class.class) lower_class FROM service_class');
101 while ($rec = $ilDB->fetchAssoc($set)) {
102 $this->service_classes[$rec[
'lower_class']] = $rec;
104 $set = $ilDB->query(
'SELECT * FROM ctrl_calls');
105 while ($rec = $ilDB->fetchAssoc($set)) {
106 $this->ctrl_calls[$rec[
'parent']][] = $rec;
108 $set = $ilDB->query(
'SELECT * FROM ctrl_classfile');
109 while ($rec = $ilDB->fetchAssoc($set)) {
110 $this->ctrl_classfile[$rec[
'cid']] = $rec;
111 $this->ctrl_classfile_parent[$rec[
'class']] = $rec;
122 return $this->module_classes[$class];
132 return $this->service_classes[$class];
142 return $this->ctrl_classfile[$cid];
152 if (is_array($this->ctrl_calls[$parent])) {
153 return $this->ctrl_calls[$parent];
166 return $this->ctrl_classfile_parent[$class];