ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAdvancedMDRecordXMLWriter Class Reference
+ Inheritance diagram for ilAdvancedMDRecordXMLWriter:
+ Collaboration diagram for ilAdvancedMDRecordXMLWriter:

Public Member Functions

 __construct ($a_record_ids)
 Constructor. More...
 
 write ()
 generate xml More...
 
- Public Member Functions inherited from ilXmlWriter
 __construct ($version="1.0", $outEnc="utf-8", $inEnc="utf-8")
 constructor More...
 
 _ilXmlWriter ()
 destructor public More...
 
 xmlSetDtdDef ($dtdDef)
 Sets dtd definition. More...
 
 xmlSetStSheet ($stSheet)
 Sets stylesheet. More...
 
 xmlSetGenCmt ($genCmt)
 Sets generated comment. More...
 
 xmlEncodeData ($data)
 Encodes text from input encoding into output encoding. More...
 
 xmlFormatData ($data)
 Indents text for better reading. More...
 
 xmlFormatElement ($array)
 Callback function for xmlFormatData; do not invoke directly. More...
 
 xmlHeader ()
 Writes xml header public. More...
 
 xmlStartTag ($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
 Writes a starttag. More...
 
 xmlEndTag ($tag)
 Writes an endtag. More...
 
 xmlComment ($comment)
 Writes a comment. More...
 
 xmlData ($data, $encode=true, $escape=true)
 Writes data. More...
 
 xmlElement ($tag, $attrs=null, $data=null, $encode=true, $escape=true)
 Writes a basic element (no children, just textual content) More...
 
 xmlDumpFile ($file, $format=true)
 Dumps xml document from memory into a file. More...
 
 xmlDumpMem ($format=true)
 Returns xml document from memory. More...
 
 appendXML ($a_str)
 append xml string to document More...
 
 xmlClear ()
 clears xmlStr public More...
 

Protected Member Functions

 buildHeader ()
 build header More...
 

Protected Attributes

 $record_ids = array()
 
 $settings = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlWriter
static _xmlEscapeData ($data)
 Escapes reserved characters. More...
 
- Data Fields inherited from ilXmlWriter
 $xmlStr
 
 $version
 
 $outEnc
 
 $inEnc
 
 $dtdDef = ""
 
 $stSheet = ""
 
 $genCmt = "Generated by ILIAS XmlWriter"
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 35 of file class.ilAdvancedMDRecordXMLWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMDRecordXMLWriter::__construct (   $a_record_ids)

Constructor.

public

Parameters

Definition at line 47 of file class.ilAdvancedMDRecordXMLWriter.php.

References $DIC, $ilSetting, and settings().

48  {
49  global $DIC;
50 
51  $ilSetting = $DIC['ilSetting'];
52 
53  parent::__construct();
54  $this->settings = $ilSetting;
55 
56  $this->record_ids = $a_record_ids ? $a_record_ids : array();
57  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

Member Function Documentation

◆ buildHeader()

ilAdvancedMDRecordXMLWriter::buildHeader ( )
protected

build header

protected

Definition at line 82 of file class.ilAdvancedMDRecordXMLWriter.php.

References settings(), ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlSetGenCmt().

Referenced by write().

83  {
84  $this->xmlSetDtdDef("<!DOCTYPE AdvancedMetaDataRecords PUBLIC \"-//ILIAS//DTD AdvancedMetaDataRecords//EN\" \"" .
85  ILIAS_HTTP_PATH . "/Services/AdvancedMetaData/xml/ilias_advanced_meta_data_records_3_9.dtd\">");
86  $this->xmlSetGenCmt("Export of ILIAS Advanced meta data records of installation " . $this->settings->get('inst_id') . ".");
87  $this->xmlHeader();
88  }
xmlSetGenCmt($genCmt)
Sets generated comment.
settings()
Definition: settings.php:2
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlHeader()
Writes xml header public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write()

ilAdvancedMDRecordXMLWriter::write ( )

generate xml

public

Definition at line 65 of file class.ilAdvancedMDRecordXMLWriter.php.

References buildHeader(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

66  {
67  $this->buildHeader();
68 
69  $this->xmlStartTag('AdvancedMetaDataRecords');
70  foreach ($this->record_ids as $record_id) {
71  $record_obj = ilAdvancedMDRecord::_getInstanceByrecordId($record_id);
72  $record_obj->toXML($this);
73  }
74  $this->xmlEndTag('AdvancedMetaDataRecords');
75  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlEndTag($tag)
Writes an endtag.
+ Here is the call graph for this function:

Field Documentation

◆ $record_ids

ilAdvancedMDRecordXMLWriter::$record_ids = array()
protected

Definition at line 37 of file class.ilAdvancedMDRecordXMLWriter.php.

◆ $settings

ilAdvancedMDRecordXMLWriter::$settings = null
protected

Definition at line 38 of file class.ilAdvancedMDRecordXMLWriter.php.


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