ILIAS  release_8 Revision v8.24
ilXmlExporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilXmlExporter:
+ Collaboration diagram for ilXmlExporter:

Public Member Functions

 __construct ()
 
 setExport (ilExport $a_exp)
 
 getExport ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 init ()
 
 setExportDirectories (string $a_dir_relative, string $a_dir_absolute)
 
 getRelativeExportDirectory ()
 
 getAbsoluteExportDirectory ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion (string $a_entity, string $a_target_release)
 

Static Public Member Functions

static lookupExportDirectory (string $a_obj_type, int $a_obj_id, string $a_export_type='xml', string $a_entity="")
 

Protected Attributes

string $dir_relative = ""
 
string $dir_absolute = ""
 
ilExport $exp
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Xml Exporter class

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 27 of file class.ilXmlExporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilXmlExporter::__construct ( )

Member Function Documentation

◆ determineSchemaVersion()

ilXmlExporter::determineSchemaVersion ( string  $a_entity,
string  $a_target_release 
)
final

Definition at line 125 of file class.ilXmlExporter.php.

128 : array {
129 $svs = $this->getValidSchemaVersions($a_entity);
130 $found = false;
131 $rsv = [];
132 foreach ($svs as $k => $sv) {
133 if (!$found) {
134 if (version_compare($sv["min"], ILIAS_VERSION_NUMERIC, "<=")
135 && ($sv["max"] == "" || version_compare($sv["max"], ILIAS_VERSION_NUMERIC, ">="))) {
136 $rsv = $sv;
137 $rsv["schema_version"] = $k;
138 $found = true;
139 }
140 }
141 }
142 return $rsv;
143 }
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
const ILIAS_VERSION_NUMERIC

References ILIAS_VERSION_NUMERIC.

◆ getAbsoluteExportDirectory()

◆ getExport()

ilXmlExporter::getExport ( )

Definition at line 42 of file class.ilXmlExporter.php.

42 : ilExport
43 {
44 return $this->exp;
45 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $exp.

Referenced by ilLearningModuleExporter\init(), ilMediaPoolExporter\init(), and ilSkillExporter\init().

+ Here is the caller graph for this function:

◆ getRelativeExportDirectory()

ilXmlExporter::getRelativeExportDirectory ( )

Definition at line 77 of file class.ilXmlExporter.php.

77 : string
78 {
80 }

Referenced by ilFileExporter\getXmlRepresentation(), and ilForumExporter\getXmlRepresentation().

+ Here is the caller graph for this function:

◆ getValidSchemaVersions()

◆ getXmlExportHeadDependencies()

ilXmlExporter::getXmlExportHeadDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Get head dependencies.

Returns
array array of array with keys "component", entity", "ids"

Reimplemented in ilCategoryExporter, ilCourseExporter, ilDataCollectionExporter, ilFolderExporter, ilGroupExporter, ilLearningSequenceExporter, ilMediaPoolExporter, ilAccessControlExporter, ilAdvancedMetaDataExporter, ilContainerReferenceExporter, ilCOPageExporter, ilNewsExporter, and ilTaxonomyExporter.

Definition at line 91 of file class.ilXmlExporter.php.

95 : array {
96 return [];
97 }

◆ getXmlExportTailDependencies()

◆ getXmlRepresentation()

◆ init()

◆ lookupExportDirectory()

static ilXmlExporter::lookupExportDirectory ( string  $a_obj_type,
int  $a_obj_id,
string  $a_export_type = 'xml',
string  $a_entity = "" 
)
static

Reimplemented in ilTestQuestionPoolExporter.

Definition at line 47 of file class.ilXmlExporter.php.

52 : string {
53 $ent = ($a_entity == "")
54 ? ""
55 : "_" . $a_entity;
56
57 if ($a_export_type == 'xml') {
58 return ilFileUtils::getDataDir() . "/" . $a_obj_type . $ent . "_data" . "/" . $a_obj_type . "_" . $a_obj_id . "/export";
59 }
60 return ilFileUtils::getDataDir() . "/" . $a_obj_type . $ent . "_data" . "/" . $a_obj_type . "_" . $a_obj_id . "/export_" . $a_export_type;
61 }
static getDataDir()
get data directory (outside webspace)

References ilFileUtils\getDataDir().

+ Here is the call graph for this function:

◆ setExport()

ilXmlExporter::setExport ( ilExport  $a_exp)

Definition at line 37 of file class.ilXmlExporter.php.

37 : void
38 {
39 $this->exp = $a_exp;
40 }

◆ setExportDirectories()

ilXmlExporter::setExportDirectories ( string  $a_dir_relative,
string  $a_dir_absolute 
)

Definition at line 71 of file class.ilXmlExporter.php.

71 : void
72 {
73 $this->dir_relative = $a_dir_relative;
74 $this->dir_absolute = $a_dir_absolute;
75 }

Field Documentation

◆ $dir_absolute

string ilXmlExporter::$dir_absolute = ""
protected

Definition at line 30 of file class.ilXmlExporter.php.

◆ $dir_relative

string ilXmlExporter::$dir_relative = ""
protected

Definition at line 29 of file class.ilXmlExporter.php.

◆ $exp

ilExport ilXmlExporter::$exp
protected

The documentation for this class was generated from the following file: