ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilXmlExporter Class Reference

Xml Exporter class. 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

ilExport $exp
 

Detailed Description

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 122 of file class.ilXmlExporter.php.

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

References ILIAS_VERSION_NUMERIC.

◆ getAbsoluteExportDirectory()

ilXmlExporter::getAbsoluteExportDirectory ( )

◆ getExport()

ilXmlExporter::getExport ( )

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

40 : ilExport
41 {
42 return $this->exp;
43 }

References $exp.

Referenced by ilScormAiccExporter\getXmlRepresentation(), and ilDataSet\initByExporter().

+ Here is the caller graph for this function:

◆ getRelativeExportDirectory()

ilXmlExporter::getRelativeExportDirectory ( )

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

74 : string
75 {
76 return $this->exp->getRelativeExportDirectory();
77 }

◆ 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 ilAccessControlExporter, ilAdvancedMetaDataExporter, ilCategoryExporter, ilContainerReferenceExporter, ilCOPageExporter, ilCourseExporter, ilDataCollectionExporter, ilFolderExporter, ilGroupExporter, ilLearningSequenceExporter, ilMediaPoolExporter, ilNewsExporter, ilTaxonomyExporter, and ilTestExporter.

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

92 : array {
93 return [];
94 }

◆ 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 45 of file class.ilXmlExporter.php.

50 : string {
51 $ent = ($a_entity == "")
52 ? ""
53 : "_" . $a_entity;
54
55 if ($a_export_type == 'xml') {
56 return ilFileUtils::getDataDir() . "/" . $a_obj_type . $ent . "_data" . "/" . $a_obj_type . "_" . $a_obj_id . "/export";
57 }
58 return ilFileUtils::getDataDir() . "/" . $a_obj_type . $ent . "_data" . "/" . $a_obj_type . "_" . $a_obj_id . "/export_" . $a_export_type;
59 }
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 35 of file class.ilXmlExporter.php.

35 : void
36 {
37 $this->exp = $a_exp;
38 }

◆ setExportDirectories()

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

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

69 : void
70 {
71 $this->exp->setExportDirectories($a_dir_relative, $a_dir_absolute);
72 }

Field Documentation

◆ $exp

ilExport ilXmlExporter::$exp
protected

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