5 define (
"IL_COMP_MODULE",
"Modules");
6 define (
"IL_COMP_SERVICE",
"Services");
7 define (
"IL_COMP_PLUGIN",
"Plugins");
41 abstract function isCore();
56 $set = $ilDB->queryF(
"SELECT * FROM il_component WHERE type = %s ".
57 " AND name = %s", array(
"text",
"text"),
59 $rec = $ilDB->fetchAssoc($set);
61 $this->
setId($rec[
"id"]);
93 $this->pluginslots = $a_pluginslots;
103 return $this->pluginslots;
116 $set = $ilDB->queryF(
"SELECT * FROM il_component WHERE type = %s ".
117 " AND name = %s", array(
"text",
"text"),
118 array($a_ctype, $a_cname));
119 if (!$ilDB->fetchAssoc($set))
127 if (is_file(
"./Modules/".$a_cname.
"/classes/class.il".$a_cname.
"Module.php"))
129 include_once(
"./Modules/".$a_cname.
"/classes/class.il".$a_cname.
"Module.php");
130 $class =
"il".$a_cname.
"Module";
131 $comp =
new $class();
137 if (is_file(
"./Services/".$a_cname.
"/classes/class.il".$a_cname.
"Service.php"))
139 include_once(
"./Services/".$a_cname.
"/classes/class.il".$a_cname.
"Service.php");
140 $class =
"il".$a_cname.
"Service";
141 $comp =
new $class();
157 $this->subdirectory = $a_subdirectory;
167 return $this->subdirectory;
177 $set = $ilDB->query(
"SELECT * FROM il_pluginslot WHERE component = ".
178 $ilDB->quote($a_type.
"/".$a_name,
"text"));
181 while($rec = $ilDB->fetchAssoc($set))
183 $rec[
"dir"] =
"Customizing/global/plugins/".$a_type.
"/".$a_name.
"/".$rec[
"name"];
184 $rec[
"dir_pres"] =
"Customizing/global/plugins/<br />".$a_type.
"/".$a_name.
"/".$rec[
"name"];
186 $ps[$rec[
"id"]] = $rec;
200 return $slots[$a_id][
"name"];
212 return "Customizing/global/plugins/".$this->getComponentType().
"/".
213 $this->
getName().
"/".$slots[$a_id][
"name"];
224 return $this->
getId().
"_".$slots[$a_id][
"id"].
"_";
234 $set = $ilDB->queryF(
"SELECT * FROM il_component WHERE type = %s ".
235 " AND name = %s", array(
"text",
"text"),
236 array($a_type, $a_name));
237 $rec = $ilDB->fetchAssoc($set);
249 $parts = explode(
".", $a_ver);
251 if (count($parts) != 3)
253 return "Version Number does not conform to format a.b.c";
256 if (!is_numeric($parts[0]) || !is_numeric($parts[1]) || !is_numeric($parts[2]))
258 return "Not all version number parts a.b.c are numeric.";
268 if (is_array($a_arr1) && is_array($a_arr2))
288 if ($a_ver1[0] > $a_ver2[0])
292 else if ($a_ver1[0] < $a_ver2[0])
296 else if ($a_ver1[1] > $a_ver2[1])
300 else if ($a_ver1[1] < $a_ver2[1])
304 else if ($a_ver1[2] > $a_ver2[2])