ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilSoapStructureObjectXMLWriter.php
Go to the documentation of this file.
1 <?php
2 
30 {
31  public string $xml;
33 
34  public function __construct()
35  {
36  global $DIC;
37 
38  $ilUser = $DIC->user();
40  }
41 
42  public function setStructureObject(ilSoapStructureObject $structureObject): void
43  {
44  $this->structureObject = $structureObject;
45  }
46 
47  public function start(): bool
48  {
49  if (!is_object($this->structureObject)) {
50  return false;
51  }
52 
53  $this->buildHeader();
54  $this->structureObject->exportXML($this);
55  $this->buildFooter();
56  return true;
57  }
58 
59  public function getXML(): string
60  {
61  return $this->xmlDumpMem(false);
62  }
63 
64  private function buildHeader(): void
65  {
66  $this->xmlSetDtdDef("<!DOCTYPE RepositoryObject PUBLIC \"-//ILIAS//DTD UserImport//EN\" \"" . ILIAS_HTTP_PATH . "/components/ILIAS/Export/xml/ilias_soap_structure_object_3_7.dtd\">");
67  $this->xmlSetGenCmt("Internal Structure Information of Repository Object");
68  $this->xmlHeader();
69  }
70 
71  private function buildFooter(): void
72  {
73  }
74 }
xmlSetGenCmt(string $genCmt)
Sets generated comment.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.
global $DIC
Definition: shib_login.php:26
setStructureObject(ilSoapStructureObject $structureObject)
xmlHeader()
Writes xml header.
__construct(Container $dic, ilPlugin $plugin)
xmlDumpMem(bool $format=true)
Returns xml document from memory.