56 if (!isset(self::$instance)) {
58 $cached_obj = $global_cache->get(
'ilCachedCtrl');
60 self::$instance = $cached_obj;
62 self::$instance =
new self();
63 $global_cache->set(
'ilCachedCtrl', self::$instance);
67 return self::$instance;
74 self::$instance = null;
91 $this->db = $DIC->database();
100 $this->global_cache->set(
'ilCachedCtrl', $this);
105 protected function readFromDB()
111 $set =
$ilDB->query(
'SELECT module_class.*, LOWER(module_class.class) lower_class FROM module_class');
112 while ($rec =
$ilDB->fetchAssoc($set)) {
113 $this->module_classes[$rec[
'lower_class']] = $rec;
115 $set =
$ilDB->query(
'SELECT service_class.*, LOWER(service_class.class) lower_class FROM service_class');
116 while ($rec =
$ilDB->fetchAssoc($set)) {
117 $this->service_classes[$rec[
'lower_class']] = $rec;
119 $set =
$ilDB->query(
'SELECT * FROM ctrl_calls');
120 while ($rec =
$ilDB->fetchAssoc($set)) {
121 $this->ctrl_calls[$rec[
'parent']][] = $rec;
123 $set =
$ilDB->query(
'SELECT * FROM ctrl_classfile');
124 while ($rec =
$ilDB->fetchAssoc($set)) {
125 $this->ctrl_classfile[$rec[
'cid']] = $rec;
126 $this->ctrl_classfile_parent[$rec[
'class']] = $rec;
138 return $this->module_classes[$class];
149 return $this->service_classes[$class];
160 return $this->ctrl_classfile[$cid];
171 if (is_array($this->ctrl_calls[$parent])) {
172 return $this->ctrl_calls[$parent];
186 return $this->ctrl_classfile_parent[$class];
313 'ctrl_classfile_parent' 325 $this->db = $DIC->database();
setCtrlClassfile($ctrl_classfile)
__sleep()
Declares all fields which should be serialized by php.
setCtrlCalls($ctrl_calls)
static getInstance($component)
lookupModuleClass($class)
lookupServiceClass($class)
Create styles array
The data for the language used.
setCtrlClassfileParent($ctrl_classfile_parent)
__wakeup()
Restore database connection.
setServiceClasses($service_classes)
setModuleClasses($module_classes)