ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
XMLArtifact.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Setup\Artifact;
22 
23 use ILIAS\Setup;
24 
25 class XMLArtifact implements Setup\Artifact
26 {
27  public function __construct(
28  private \SimpleXMLElement $xml
29  ) {
30  }
31 
32  final public function serialize(): string
33  {
34  $dom = dom_import_simplexml($this->xml)->ownerDocument;
35  $dom->formatOutput = true;
36  return $dom->saveXML();
37  }
38 }
__construct(private \SimpleXMLElement $xml)
Definition: XMLArtifact.php:27
serialize()
This method will be called from the source, which wants to save the artifact.
Definition: XMLArtifact.php:32
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An artifact is some file that is build on demand per installation and is not shipped with the ILIAS s...
Definition: Artifact.php:27