ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilChatroomExporter Class Reference

Class ilChatroomExporter. More...

+ Inheritance diagram for ilChatroomExporter:
+ Collaboration diagram for ilChatroomExporter:

Public Member Functions

 init ()
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation.
Parameters
stringentity
stringschema version
stringid
Returns
string xml string
More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies.
Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"
More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to.ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top. Example:

            return array (
    "4.1.0" => array(
            "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1",
            "xsd_file" => "ilias_md_4_1.xsd",
            "min" => "4.1.0",
            "max" => "")
    );
Returns
array
More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. More...
 
 setExport (ilExport $a_exp)
 Set export object. More...
 
 getExport ()
 Get export. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 init ()
 
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories. More...
 
 getRelativeExportDirectory ()
 Get relative export directory. More...
 
 getAbsoluteExportDirectory ()
 Get absolute export directory. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 
 $exp
 

Detailed Description

Class ilChatroomExporter.

Definition at line 9 of file class.ilChatroomExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilChatroomExporter::getValidSchemaVersions (   $a_entity)

Returns schema versions that the component can export to.ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top. Example:

            return array (
    "4.1.0" => array(
            "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1",
            "xsd_file" => "ilias_md_4_1.xsd",
            "min" => "4.1.0",
            "max" => "")
    );
Returns
array

Reimplemented from ilXmlExporter.

Definition at line 57 of file class.ilChatroomExporter.php.

58 {
59 return array(
60 '5.3.0' => array(
61 'namespace' => 'http://www.ilias.de/Modules/Chatroom/chtr/5_3',
62 'xsd_file' => 'ilias_chtr_5_3.xsd',
63 'uses_dataset' => false,
64 'min' => '5.3.0',
65 'max' => '5.3.999'
66 )
67 );
68 }

◆ getXmlExportTailDependencies()

ilChatroomExporter::getXmlExportTailDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

Definition at line 39 of file class.ilChatroomExporter.php.

40 {
41 $deps = [];
42
43 if ('chtr' === $a_entity) {
44 $deps[] = [
45 'component' => 'Services/Object',
46 'entity' => 'common',
47 'ids' => $a_ids
48 ];
49 }
50
51 return $deps;
52 }

◆ getXmlRepresentation()

ilChatroomExporter::getXmlRepresentation (   $a_entity,
  $a_schema_version,
  $a_id 
)

Get xml representation.

Parameters
stringentity
stringschema version
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

Definition at line 21 of file class.ilChatroomExporter.php.

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 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Class ilChatroomXMLWriter.
Class ilObjChatroom.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id

References $GLOBALS, and ilObjectFactory\getInstanceByObjId().

+ Here is the call graph for this function:

◆ init()

ilChatroomExporter::init ( )

Reimplemented from ilXmlExporter.

Definition at line 14 of file class.ilChatroomExporter.php.

15 {
16 }

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