ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilSoapStructureObjectXMLWriter.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 
17 {
18  public string $xml;
20 
21  public function __construct()
22  {
23  global $DIC;
24 
25  $ilUser = $DIC->user();
27  }
28 
29  public function setStructureObject(ilSoapStructureObject $structureObject): void
30  {
31  $this->structureObject = $structureObject;
32  }
33 
34  public function start(): bool
35  {
36  if (!is_object($this->structureObject)) {
37  return false;
38  }
39 
40  $this->buildHeader();
41  $this->structureObject->exportXML($this);
42  $this->buildFooter();
43  return true;
44  }
45 
46  public function getXML(): string
47  {
48  return $this->xmlDumpMem(false);
49  }
50 
51  private function buildHeader(): void
52  {
53  $this->xmlSetDtdDef("<!DOCTYPE RepositoryObject PUBLIC \"-//ILIAS//DTD UserImport//EN\" \"" . ILIAS_HTTP_PATH . "/components/ILIAS/Export/xml/ilias_soap_structure_object_3_7.dtd\">");
54  $this->xmlSetGenCmt("Internal Structure Information of Repository Object");
55  $this->xmlHeader();
56  }
57 
58  private function buildFooter(): void
59  {
60  }
61 }
xmlSetGenCmt(string $genCmt)
Sets generated comment.
XML writer class Class to simplify manual writing of xml documents.
Abstract classs for soap structure objects.
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.
global $DIC
Definition: shib_login.php:25
setStructureObject(ilSoapStructureObject $structureObject)
xmlHeader()
Writes xml header.
__construct(Container $dic, ilPlugin $plugin)
xmlDumpMem(bool $format=true)
Returns xml document from memory.