ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
ilAdvancedMDRecordXMLWriter Class Reference
+ Inheritance diagram for ilAdvancedMDRecordXMLWriter:
+ Collaboration diagram for ilAdvancedMDRecordXMLWriter:

Public Member Functions

 __construct (array $a_record_ids)
 Constructor public. More...
 
 write ()
 
- Public Member Functions inherited from ilXmlWriter
 __construct (string $version="1.0", string $outEnc="utf-8", string $inEnc="utf-8")
 
 xmlSetDtdDef (string $dtdDef)
 Sets dtd definition. More...
 
 xmlSetGenCmt (string $genCmt)
 Sets generated comment. More...
 
 xmlFormatData (string $data)
 Indents text for better reading. More...
 
 xmlHeader ()
 Writes xml header. More...
 
 xmlStartTag (string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
 Writes a starttag. More...
 
 xmlEndTag (string $tag)
 Writes an endtag. More...
 
 xmlData (string $data, bool $encode=true, bool $escape=true)
 Writes data. More...
 
 xmlElement (string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
 Writes a basic element (no children, just textual content) More...
 
 xmlDumpFile (string $file, bool $format=true)
 Dumps xml document from memory into a file. More...
 
 xmlDumpMem (bool $format=true)
 Returns xml document from memory. More...
 
 appendXML (string $a_str)
 append xml string to document More...
 
 xmlClear ()
 clears xmlStr More...
 

Protected Member Functions

 buildHeader ()
 build header protected More...
 

Protected Attributes

array $record_ids = []
 
ilSetting $settings
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMDRecordXMLWriter::__construct ( array  $a_record_ids)

Constructor public.

Parameters

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\settings().

41  {
42  global $DIC;
43 
45  $this->settings = $DIC->settings();
46  $this->record_ids = $a_record_ids;
47  }
$DIC
Definition: xapitoken.php:62
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildHeader()

ilAdvancedMDRecordXMLWriter::buildHeader ( )
protected

build header protected

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

References ILIAS\Repository\settings(), ilXmlWriter\xmlHeader(), and ilXmlWriter\xmlSetGenCmt().

Referenced by write().

64  : void
65  {
66  $this->xmlSetGenCmt("Export of ILIAS Advanced meta data records of installation " . $this->settings->get('inst_id') . ".");
67  $this->xmlHeader();
68  }
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlHeader()
Writes xml header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write()

ilAdvancedMDRecordXMLWriter::write ( )

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

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

49  : void
50  {
51  $this->buildHeader();
52  $this->xmlStartTag('AdvancedMetaDataRecords');
53  foreach ($this->record_ids as $record_id) {
54  $record_obj = ilAdvancedMDRecord::_getInstanceByRecordId($record_id);
55  $record_obj->toXML($this);
56  }
57  $this->xmlEndTag('AdvancedMetaDataRecords');
58  }
xmlEndTag(string $tag)
Writes an endtag.
static _getInstanceByRecordId(int $a_record_id)
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
+ Here is the call graph for this function:

Field Documentation

◆ $record_ids

array ilAdvancedMDRecordXMLWriter::$record_ids = []
protected

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

◆ $settings

ilSetting ilAdvancedMDRecordXMLWriter::$settings
protected

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


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