5 define (
"IL_COMP_MODULE",
"Modules");
6 define (
"IL_COMP_SERVICE",
"Services");
7 define (
"IL_COMP_PLUGIN",
"Plugins");
8 define (
"IL_COMP_SLOTS",
"Slots");
42 abstract function isCore();
57 $set = $ilDB->queryF(
"SELECT * FROM il_component WHERE type = %s ".
58 " AND name = %s", array(
"text",
"text"),
60 $rec = $ilDB->fetchAssoc($set);
62 $this->
setId($rec[
"id"]);
94 $this->pluginslots = $a_pluginslots;
104 return $this->pluginslots;
117 $set = $ilDB->queryF(
"SELECT * FROM il_component WHERE type = %s ".
118 " AND name = %s", array(
"text",
"text"),
119 array($a_ctype, $a_cname));
120 if (!$ilDB->fetchAssoc($set))
128 if (is_file(
"./Modules/".$a_cname.
"/classes/class.il".$a_cname.
"Module.php"))
130 include_once(
"./Modules/".$a_cname.
"/classes/class.il".$a_cname.
"Module.php");
131 $class =
"il".$a_cname.
"Module";
132 $comp =
new $class();
138 if (is_file(
"./Services/".$a_cname.
"/classes/class.il".$a_cname.
"Service.php"))
140 include_once(
"./Services/".$a_cname.
"/classes/class.il".$a_cname.
"Service.php");
141 $class =
"il".$a_cname.
"Service";
142 $comp =
new $class();
158 $this->subdirectory = $a_subdirectory;
168 return $this->subdirectory;
178 $set = $ilDB->query(
"SELECT * FROM il_pluginslot WHERE component = ".
179 $ilDB->quote($a_type.
"/".$a_name,
"text"));
182 while($rec = $ilDB->fetchAssoc($set))
184 $rec[
"dir"] =
"Customizing/global/plugins/".$a_type.
"/".$a_name.
"/".$rec[
"name"];
185 $rec[
"dir_pres"] =
"Customizing/global/plugins/<br />".$a_type.
"/".$a_name.
"/".$rec[
"name"];
187 $ps[$rec[
"id"]] = $rec;
201 return $slots[$a_id][
"name"];
213 return "Customizing/global/plugins/".$this->getComponentType().
"/".
214 $this->
getName().
"/".$slots[$a_id][
"name"];
225 return $this->
getId().
"_".$slots[$a_id][
"id"].
"_";
235 $set = $ilDB->queryF(
"SELECT * FROM il_component WHERE type = %s ".
236 " AND name = %s", array(
"text",
"text"),
237 array($a_type, $a_name));
238 $rec = $ilDB->fetchAssoc($set);
250 $parts = explode(
".", $a_ver);
252 if (count($parts) != 3)
254 return "Version Number does not conform to format a.b.c";
257 if (!is_numeric($parts[0]) || !is_numeric($parts[1]) || !is_numeric($parts[2]))
259 return "Not all version number parts a.b.c are numeric.";
269 if (is_array($a_arr1) && is_array($a_arr2))
289 if ($a_ver1[0] > $a_ver2[0])
293 else if ($a_ver1[0] < $a_ver2[0])
297 else if ($a_ver1[1] > $a_ver2[1])
301 else if ($a_ver1[1] < $a_ver2[1])
305 else if ($a_ver1[2] > $a_ver2[2])