ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
5include_once "./Services/Xml/classes/class.ilXmlWriter.php";
6
20{
21 public $ilias;
22 public $xml;
24 public $user_id = 0;
25
33 public function __construct()
34 {
35 global $DIC;
36
37 $ilias = $DIC['ilias'];
38 $ilUser = $DIC['ilUser'];
39
40 parent::__construct();
41
42 $this->ilias =&$ilias;
43 $this->user_id = $ilUser->getId();
44 }
45
46
48 {
49 $this->structureObject = &$structureObject;
50 }
51
52
53 public function start()
54 {
55 if (!is_object($this->structureObject)) {
56 return false;
57 }
58
59 $this->__buildHeader();
60
61 $this->structureObject->exportXML($this);
62
63 $this->__buildFooter();
64
65 return true;
66 }
67
68 public function getXML()
69 {
70 return $this->xmlDumpMem(false);
71 }
72
73
74 public function __buildHeader()
75 {
76 $this->xmlSetDtdDef("<!DOCTYPE RepositoryObject PUBLIC \"-//ILIAS//DTD UserImport//EN\" \"" . ILIAS_HTTP_PATH . "/xml/ilias_soap_structure_object_3_7.dtd\">");
77 $this->xmlSetGenCmt("Internal Structure Information of Repository Object");
78 $this->xmlHeader();
79
80
81 return true;
82 }
83
84 public function __buildFooter()
85 {
86 }
87}
An exception for terminatinating execution or to throw for unit testing.
XML writer class.
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlDumpMem($format=true)
Returns xml document from memory.
xmlHeader()
Writes xml header @access public.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
redirection script todo: (a better solution should control the processing via a xml file)
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18