ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilChatroomExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Export/classes/class.ilXmlExporter.php';
5
10{
14 public function init()
15 {
16 }
17
21 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
22 {
23 $chat = ilObjectFactory::getInstanceByObjId($a_id, false);
24 if (!($chat instanceof ilObjChatroom)) {
25 $GLOBALS['DIC']->logger()->root()->warning($a_id . ' is not id of chatroom instance. Skipped generation of export XML.');
26 return '';
27 }
28
29 require_once 'Modules/Chatroom/classes/class.ilChatroomXMLWriter.php';
30 $writer = new ilChatroomXMLWriter($chat);
31 $writer->start();
32
33 return $writer->getXml();
34 }
35
39 public function getValidSchemaVersions($a_entity)
40 {
41 return array(
42 '5.3.0' => array(
43 'namespace' => 'http://www.ilias.de/Modules/Chatroom/chtr/5_3',
44 'xsd_file' => 'ilias_chtr_5_3.xsd',
45 'uses_dataset' => false,
46 'min' => '5.3.0',
47 'max' => '5.3.999'
48 )
49 );
50 }
51}
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomExporter.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.string xml string
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.ILIAS chooses the first one,...
Class ilChatroomXMLWriter.
Class ilObjChatroom.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Xml Exporter class.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.