14 public static function getExporterClass(
$a_type)
21 $objDefinition = $DIC[
'objDefinition'];
23 if ($objDefinition->isPlugin(
$a_type)) {
24 $classname =
'il' . $objDefinition->getClassName(
$a_type) .
'Exporter';
26 if (include_once
$location .
'/class.' . $classname .
'.php') {
30 $comp = $objDefinition->getComponentForType(
$a_type);
31 $class = array_pop(explode(
"/", $comp));
32 $class =
"il" . $class .
"Exporter";
36 if (class_exists($class)) {
44 if (include_once
"./" . $comp .
"/classes/class." . $class .
".php") {
52 public static function getComponentForExport(
$a_type)
59 $objDefinition = $DIC[
'objDefinition'];
61 if ($objDefinition->isPlugin(
$a_type)) {
62 return self::PLUGINS_DIR .
"/" .
$a_type;
64 return $objDefinition->getComponentForType(
$a_type);
75 public static function getImporterClass($a_component)
81 $objDefinition = $DIC[
'objDefinition'];
83 $parts = explode(
'/', $a_component);
84 $component_type = $parts[0];
85 $component = $parts[1];
87 if ($component_type == self::PLUGINS_DIR &&
88 $objDefinition->isPlugin($component)) {
89 $classname =
'il' . $objDefinition->getClassName($component) .
'Importer';
90 $location = $objDefinition->getLocation($component);
91 if (include_once
$location .
'/class.' . $classname .
'.php') {
95 $class =
"il" . $component .
"Importer";
101 if (class_exists($class)) {
107 elseif ($component_type == self::PLUGINS_DIR) {
111 if (is_file(
"./" . $a_component .
"/classes/class." . $class .
".php")) {
116 throw new InvalidArgumentException(
'Invalid importer type given: ' .
"./" . $a_component .
"/classes/class." . $class .
".php");
Factory for importer/exporter implementers.