ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 
4 include_once("./Services/Export/classes/class.ilXmlExporter.php");
5 
14 {
15  private $ds;
16 
20  public function init()
21  {
22 
23  }
24 
25 
34  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
35  {
36  $xml = '';
37 
38  include_once 'Modules/Forum/classes/class.ilForumXMLWriter.php';
39  if(ilObject::_lookupType($a_id) == 'frm')
40  {
41  $writer = new ilForumXMLWriter();
42  $writer->setForumId($a_id);
44  $writer->setFileTargetDirectories($this->getRelativeExportDirectory(), $this->getAbsoluteExportDirectory());
45  $writer->start();
46  $xml .= $writer->getXml();
47  }
48 
49  return $xml;
50  }
51 
59  function getValidSchemaVersions($a_entity)
60  {
61  return array(
62  "4.1.0" => array(
63  "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_1",
64  "xsd_file" => "ilias_frm_4_1.xsd",
65  "uses_dataset" => false,
66  "min" => "4.1.0",
67  "max" => "4.4.999"
68  ),
69  "4.5.0" => array(
70  "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_5",
71  "xsd_file" => "ilias_frm_4_5.xsd",
72  "uses_dataset" => false,
73  "min" => "4.5.0",
74  "max" => "5.0.999"
75  ),
76  "5.1.0" => array(
77  "namespace" => "http://www.ilias.de/Modules/Forum/frm/5_1",
78  "xsd_file" => "ilias_frm_5_1.xsd",
79  "uses_dataset" => false,
80  "min" => "5.1.0",
81  "max" => ""
82  )
83  );
84  }
85 }
86 ?>
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getRelativeExportDirectory()
Get relative export directory.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
Xml Exporter class.
XML writer class.
Exporter class for sessions.
init()
Initialisation.
getAbsoluteExportDirectory()
Get absolute export directory.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.