ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilCmiXapiExporter.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
16{
17 const ENTITY = 'cmix';
18 const SCHEMA_VERSION = '5.1.0';
19
20 private $main_object = null;
21 private $_dataset = null;
22
23 public function __construct()
24 {
26 include_once("./Modules/CmiXapi/classes/class.ilCmiXapiDataSet.php");
27 $this->_dataset = new ilCmiXapiDataSet();
28 $this->_dataset->setExportDirectories($this->dir_relative, $this->dir_absolute);
29 $this->_dataset->setDSPrefix("ds");
30
31 /*
32 $this->main_object = $a_main_object;
33 include_once("./Modules/CmiXapi/classes/class.ilCmiXapiDataSet.php");
34 $this->dataset = new ilCmiXapiDataSet($this->main_object->getRefId());
35 $this->getXmlRepresentation(self::ENTITY, self::SCHEMA_VERSION, $this->main_object->getRefId());
36 */
37 }
38
39 public function init()
40 {
41 }
42
51 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
52 {
53 return $this->_dataset->getCmiXapiXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
54 }
55
56
57 public function getValidSchemaVersions($a_entity)
58 {
59 return array(
60 "5.1.0" => array(
61 "namespace" => "http://www.ilias.de/Modules/CmiXapi/cmix/5_1",
62 "xsd_file" => "xml/ilias_cmix_5_1.xsd",
63 "uses_dataset" => true,
64 "min" => "5.1.0",
65 "max" => "")
66 );
67 }
68}
An exception for terminatinating execution or to throw for unit testing.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
Xml Exporter class.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc