ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSoapStructureObjectXMLWriter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct ()
 
 setStructureObject (ilSoapStructureObject $structureObject)
 
 start ()
 
 getXML ()
 
- Public Member Functions inherited from ilXmlWriter
 __construct (string $version="1.0", string $outEnc="utf-8", string $inEnc="utf-8")
 
 xmlSetDtdDef (string $dtdDef)
 Sets dtd definition. More...
 
 xmlSetGenCmt (string $genCmt)
 Sets generated comment. More...
 
 xmlFormatData (string $data)
 Indents text for better reading. More...
 
 xmlHeader ()
 Writes xml header. More...
 
 xmlStartTag (string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
 Writes a starttag. More...
 
 xmlEndTag (string $tag)
 Writes an endtag. More...
 
 xmlData (string $data, bool $encode=true, bool $escape=true)
 Writes data. More...
 
 xmlElement (string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
 Writes a basic element (no children, just textual content) More...
 
 xmlDumpFile (string $file, bool $format=true)
 Dumps xml document from memory into a file. More...
 
 xmlDumpMem (bool $format=true)
 Returns xml document from memory. More...
 
 appendXML (string $a_str)
 append xml string to document More...
 
 xmlClear ()
 clears xmlStr More...
 

Data Fields

string $xml
 
ilSoapStructureObject $structureObject = null
 

Private Member Functions

 buildHeader ()
 
 buildFooter ()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 29 of file class.ilSoapStructureObjectXMLWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilSoapStructureObjectXMLWriter::__construct ( )

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

35 {
36 global $DIC;
37
38 $ilUser = $DIC->user();
40 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildFooter()

ilSoapStructureObjectXMLWriter::buildFooter ( )
private

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

71 : void
72 {
73 }

Referenced by start().

+ Here is the caller graph for this function:

◆ buildHeader()

ilSoapStructureObjectXMLWriter::buildHeader ( )
private

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

64 : 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 }
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlHeader()
Writes xml header.
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.

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

Referenced by start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getXML()

ilSoapStructureObjectXMLWriter::getXML ( )

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

59 : string
60 {
61 return $this->xmlDumpMem(false);
62 }
xmlDumpMem(bool $format=true)
Returns xml document from memory.

References ilXmlWriter\xmlDumpMem().

+ Here is the call graph for this function:

◆ setStructureObject()

ilSoapStructureObjectXMLWriter::setStructureObject ( ilSoapStructureObject  $structureObject)

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

42 : void
43 {
44 $this->structureObject = $structureObject;
45 }

References $structureObject.

◆ start()

ilSoapStructureObjectXMLWriter::start ( )

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

47 : 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 }

References buildFooter(), and buildHeader().

+ Here is the call graph for this function:

Field Documentation

◆ $structureObject

ilSoapStructureObject ilSoapStructureObjectXMLWriter::$structureObject = null

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

Referenced by setStructureObject().

◆ $xml

string ilSoapStructureObjectXMLWriter::$xml

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


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