ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 $ilSetting, array, and settings().

48  {
49  global $ilSetting;
50 
51  parent::__construct();
52  $this->settings = $ilSetting;
53 
54  $this->record_ids = $a_record_ids ? $a_record_ids : array();
55  }
Create styles array
The data for the language used.
settings()
Definition: settings.php:2
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 80 of file class.ilAdvancedMDRecordXMLWriter.php.

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

Referenced by write().

81  {
82  $this->xmlSetDtdDef("<!DOCTYPE AdvancedMetaDataRecords PUBLIC \"-//ILIAS//DTD AdvancedMetaDataRecords//EN\" \"" .
83  ILIAS_HTTP_PATH . "/Services/AdvancedMetaData/xml/ilias_advanced_meta_data_records_3_9.dtd\">");
84  $this->xmlSetGenCmt("Export of ILIAS Advanced meta data records of installation " . $this->settings->get('inst_id') . ".");
85  $this->xmlHeader();
86  }
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlHeader()
Writes xml header public.
settings()
Definition: settings.php:2
+ 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 63 of file class.ilAdvancedMDRecordXMLWriter.php.

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

64  {
65  $this->buildHeader();
66 
67  $this->xmlStartTag('AdvancedMetaDataRecords');
68  foreach ($this->record_ids as $record_id) {
69  $record_obj = ilAdvancedMDRecord::_getInstanceByrecordId($record_id);
70  $record_obj->toXML($this);
71  }
72  $this->xmlEndTag('AdvancedMetaDataRecords');
73  }
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: