ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilForumExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Export/classes/class.ilXmlExporter.php");
5
14{
15 private $ds;
16
20 public function init()
21 {
22 }
23
24
33 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
34 {
35 $xml = '';
36
37 include_once 'Modules/Forum/classes/class.ilForumXMLWriter.php';
38 if (ilObject::_lookupType($a_id) == 'frm') {
39 $writer = new ilForumXMLWriter();
40 $writer->setForumId($a_id);
42 $writer->setFileTargetDirectories($this->getRelativeExportDirectory(), $this->getAbsoluteExportDirectory());
43 $writer->start();
44 $xml .= $writer->getXml();
45 }
46
47 return $xml;
48 }
49
57 public function getValidSchemaVersions($a_entity)
58 {
59 return array(
60 "4.1.0" => array(
61 "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_1",
62 "xsd_file" => "ilias_frm_4_1.xsd",
63 "uses_dataset" => false,
64 "min" => "4.1.0",
65 "max" => "4.4.999"
66 ),
67 "4.5.0" => array(
68 "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_5",
69 "xsd_file" => "ilias_frm_4_5.xsd",
70 "uses_dataset" => false,
71 "min" => "4.5.0",
72 "max" => "5.0.999"
73 ),
74 "5.1.0" => array(
75 "namespace" => "http://www.ilias.de/Modules/Forum/frm/5_1",
76 "xsd_file" => "ilias_frm_5_1.xsd",
77 "uses_dataset" => false,
78 "min" => "5.1.0",
79 "max" => ""
80 )
81 );
82 }
83}
An exception for terminatinating execution or to throw for unit testing.
Exporter class for sessions.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
init()
Initialisation.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
static _lookupType($a_id, $a_reference=false)
lookup object type
static makeDirParents($a_dir)
Create a new directory and all parent directories.
Xml Exporter class.
getRelativeExportDirectory()
Get relative export directory.
getAbsoluteExportDirectory()
Get absolute export directory.
$xml
Definition: metadata.php:240