ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSoapStructureObjectXMLWriter Class Reference

XML writer class. More...

+ Inheritance diagram for ilSoapStructureObjectXMLWriter:
+ Collaboration diagram for ilSoapStructureObjectXMLWriter:

Public Member Functions

 __construct ()
 constructor More...
 
 setStructureObject (&$structureObject)
 
 start ()
 
 getXML ()
 
 __buildHeader ()
 
 __buildFooter ()
 
- Public Member Functions inherited from ilXmlWriter
 __construct ($version="1.0", $outEnc="utf-8", $inEnc="utf-8")
 constructor More...
 
 _ilXmlWriter ()
 destructor public More...
 
 xmlSetDtdDef ($dtdDef)
 Sets dtd definition. More...
 
 xmlSetStSheet ($stSheet)
 Sets stylesheet. More...
 
 xmlSetGenCmt ($genCmt)
 Sets generated comment. More...
 
 xmlEncodeData ($data)
 Encodes text from input encoding into output encoding. More...
 
 xmlFormatData ($data)
 Indents text for better reading. More...
 
 xmlFormatElement ($array)
 Callback function for xmlFormatData; do not invoke directly. More...
 
 xmlHeader ()
 Writes xml header public. More...
 
 xmlStartTag ($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
 Writes a starttag. More...
 
 xmlEndTag ($tag)
 Writes an endtag. More...
 
 xmlComment ($comment)
 Writes a comment. More...
 
 xmlData ($data, $encode=true, $escape=true)
 Writes data. More...
 
 xmlElement ($tag, $attrs=null, $data=null, $encode=true, $escape=true)
 Writes a basic element (no children, just textual content) More...
 
 xmlDumpFile ($file, $format=true)
 Dumps xml document from memory into a file. More...
 
 xmlDumpMem ($format=true)
 Returns xml document from memory. More...
 
 appendXML ($a_str)
 append xml string to document More...
 
 xmlClear ()
 clears xmlStr public More...
 

Data Fields

 $ilias
 
 $xml
 
 $structureObject
 
 $user_id = 0
 
- Data Fields inherited from ilXmlWriter
 $xmlStr
 
 $version
 
 $outEnc
 
 $inEnc
 
 $dtdDef = ""
 
 $stSheet = ""
 
 $genCmt = "Generated by ILIAS XmlWriter"
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlWriter
static _xmlEscapeData ($data)
 Escapes reserved characters. More...
 

Detailed Description

XML writer class.

Class to simplify manual writing of xml documents. It only supports writing xml sequentially, because the xml document is saved in a string with no additional structure information. The author is responsible for well-formedness and validity of the xml document.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id
class.ilObjectXMLWriter.php,v 1.3 2005/11/04 12:50:24 smeyer Exp

Definition at line 19 of file class.ilSoapStructureObjectXMLWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilSoapStructureObjectXMLWriter::__construct ( )

constructor

Parameters
stringxml version
stringoutput encoding
stringinput encoding public

Definition at line 33 of file class.ilSoapStructureObjectXMLWriter.php.

References $DIC, $ilias, and $ilUser.

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  }
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...

Member Function Documentation

◆ __buildFooter()

ilSoapStructureObjectXMLWriter::__buildFooter ( )

Definition at line 84 of file class.ilSoapStructureObjectXMLWriter.php.

Referenced by start().

85  {
86  }
+ Here is the caller graph for this function:

◆ __buildHeader()

ilSoapStructureObjectXMLWriter::__buildHeader ( )

Definition at line 74 of file class.ilSoapStructureObjectXMLWriter.php.

References ilXmlWriter\xmlHeader(), ilXmlWriter\xmlSetDtdDef(), and ilXmlWriter\xmlSetGenCmt().

Referenced by start().

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  }
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlHeader()
Writes xml header public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getXML()

ilSoapStructureObjectXMLWriter::getXML ( )

Definition at line 68 of file class.ilSoapStructureObjectXMLWriter.php.

References ilXmlWriter\xmlDumpMem().

69  {
70  return $this->xmlDumpMem(false);
71  }
xmlDumpMem($format=true)
Returns xml document from memory.
+ Here is the call graph for this function:

◆ setStructureObject()

ilSoapStructureObjectXMLWriter::setStructureObject ( $structureObject)

Definition at line 47 of file class.ilSoapStructureObjectXMLWriter.php.

References $structureObject.

48  {
49  $this->structureObject = &$structureObject;
50  }

◆ start()

ilSoapStructureObjectXMLWriter::start ( )

Definition at line 53 of file class.ilSoapStructureObjectXMLWriter.php.

References __buildFooter(), and __buildHeader().

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  }
+ Here is the call graph for this function:

Field Documentation

◆ $ilias

ilSoapStructureObjectXMLWriter::$ilias

Definition at line 21 of file class.ilSoapStructureObjectXMLWriter.php.

Referenced by __construct().

◆ $structureObject

ilSoapStructureObjectXMLWriter::$structureObject

Definition at line 23 of file class.ilSoapStructureObjectXMLWriter.php.

Referenced by setStructureObject().

◆ $user_id

ilSoapStructureObjectXMLWriter::$user_id = 0

Definition at line 24 of file class.ilSoapStructureObjectXMLWriter.php.

◆ $xml

ilSoapStructureObjectXMLWriter::$xml

Definition at line 22 of file class.ilSoapStructureObjectXMLWriter.php.


The documentation for this class was generated from the following file: