ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAdvancedMDRecordXMLWriter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
25{
26 protected array $record_ids = [];
28
34 public function __construct(array $a_record_ids)
35 {
36 global $DIC;
37
39 $this->settings = $DIC->settings();
40 $this->record_ids = $a_record_ids;
41 }
42
43 public function write(): 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 }
53
58 protected function buildHeader(): void
59 {
60 $this->xmlSetGenCmt("Export of ILIAS Advanced meta data records of installation " . $this->settings->get('inst_id') . ".");
61 $this->xmlHeader();
62 }
63}
buildHeader()
build header @access protected
__construct(array $a_record_ids)
Constructor @access public.
static _getInstanceByRecordId(int $a_record_id)
ILIAS Setting Class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlHeader()
Writes xml header.
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26