ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAdvancedMDRecordXMLWriter Class Reference
+ Inheritance diagram for ilAdvancedMDRecordXMLWriter:
+ Collaboration diagram for ilAdvancedMDRecordXMLWriter:

Public Member Functions

 __construct (array $a_record_ids)
 Constructor @access 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 @access protected More...
 

Protected Attributes

array $record_ids = []
 
ilSetting $settings
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMDRecordXMLWriter::__construct ( array  $a_record_ids)

Constructor @access public.

Parameters

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

35 {
36 global $DIC;
37
39 $this->settings = $DIC->settings();
40 $this->record_ids = $a_record_ids;
41 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ buildHeader()

ilAdvancedMDRecordXMLWriter::buildHeader ( )
protected

build header @access protected

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

58 : void
59 {
60 $this->xmlSetGenCmt("Export of ILIAS Advanced meta data records of installation " . $this->settings->get('inst_id') . ".");
61 $this->xmlHeader();
62 }
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlHeader()
Writes xml header.

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

Referenced by write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write()

ilAdvancedMDRecordXMLWriter::write ( )

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

43 : void
44 {
45 $this->buildHeader();
46 $this->xmlStartTag('AdvancedMetaDataRecords');
47 foreach ($this->record_ids as $record_id) {
48 $record_obj = ilAdvancedMDRecord::_getInstanceByRecordId($record_id);
49 $record_obj->toXML($this);
50 }
51 $this->xmlEndTag('AdvancedMetaDataRecords');
52 }
buildHeader()
build header @access protected
static _getInstanceByRecordId(int $a_record_id)
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.

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

+ Here is the call graph for this function:

Field Documentation

◆ $record_ids

array ilAdvancedMDRecordXMLWriter::$record_ids = []
protected

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

◆ $settings

ilSetting ilAdvancedMDRecordXMLWriter::$settings
protected

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


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