XML writer for folders.
More...
Public Member Functions |
| __construct ($a_add_header) |
| Constructor.
|
| setObjId ($a_obj_id) |
| Set obj_id of weblink object.
|
| write () |
| Write XML.
|
| ilXmlWriter ($version="1.0", $outEnc="utf-8", $inEnc="utf-8") |
| constructor
|
| _ilXmlWriter () |
| destructor public
|
| xmlSetDtdDef ($dtdDef) |
| Sets dtd definition.
|
| xmlSetStSheet ($stSheet) |
| Sets stylesheet.
|
| xmlSetGenCmt ($genCmt) |
| Sets generated comment.
|
| _xmlEscapeData ($data) |
| Escapes reserved characters.
|
| xmlEncodeData ($data) |
| Encodes text from input encoding into output encoding.
|
| xmlFormatData ($data) |
| Indents text for better reading.
|
| xmlFormatElement ($array) |
| Callback function for xmlFormatData; do not invoke directly.
|
| xmlHeader () |
| Writes xml header public.
|
| xmlStartTag ($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE) |
| Writes a starttag.
|
| xmlEndTag ($tag) |
| Writes an endtag.
|
| xmlComment ($comment) |
| Writes a comment.
|
| xmlData ($data, $encode=TRUE, $escape=TRUE) |
| Writes data.
|
| xmlElement ($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE) |
| Writes a basic element (no children, just textual content)
|
| xmlDumpFile ($file, $format=TRUE) |
| Dumps xml document from memory into a file.
|
| xmlDumpMem ($format=TRUE) |
| Returns xml document from memory.
|
| appendXML ($a_str) |
| append xml string to document
|
| xmlClear () |
| clears xmlStr public
|
Protected Member Functions |
| buildHeader () |
| Build XML header.
|
| init () |
| Init xml writer.
|
Detailed Description
XML writer for folders.
- Author
- Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 14 of file class.ilFolderXmlWriter.php.
Constructor & Destructor Documentation
ilFolderXmlWriter::__construct |
( |
|
$a_add_header | ) |
|
Member Function Documentation
ilFolderXmlWriter::buildHeader |
( |
| ) |
|
|
protected |
ilFolderXmlWriter::init |
( |
| ) |
|
|
protected |
Init xml writer.
- Returns
- bool
- Exceptions
-
UnexpectedValueException | Thrown if obj_id is not of type webr |
Definition at line 79 of file class.ilFolderXmlWriter.php.
References ilObjectFactory\getInstanceByObjId(), and ilXmlWriter\xmlClear().
Referenced by write().
{
if(!$this->obj_id)
{
throw new UnexpectedValueException('No obj_id given: ');
}
include_once './Services/Object/classes/class.ilObjectFactory.php';
{
throw new UnexpectedValueException('Invalid obj_id given: '.$this->obj_id);
}
if($this->folder->getType() != 'fold')
{
throw new UnexpectedValueException('Invalid obj_id given. Object is not of type folder');
}
}
ilFolderXmlWriter::setObjId |
( |
|
$a_obj_id | ) |
|
ilFolderXmlWriter::write |
( |
| ) |
|
Write XML.
- Returns
- Exceptions
-
UnexpectedValueException | Thrown if obj_id is not of type webr or no obj_id is given |
Definition at line 45 of file class.ilFolderXmlWriter.php.
References ilContainerSortingSettings\_exportContainerSortingSettings(), buildHeader(), init(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
{
if($this->add_header)
{
}
$this->
xmlStartTag(
'Folder',array(
'Id' => $this->folder->getId()));
$this->
xmlElement(
'Title',array(),$this->folder->getTitle());
$this->
xmlElement(
'Description',array(),$this->folder->getDescription());
include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
}
Field Documentation
ilFolderXmlWriter::$add_header = true |
|
private |
ilFolderXmlWriter::$folder = null |
|
private |
ilFolderXmlWriter::$obj_id = 0 |
|
private |
The documentation for this class was generated from the following file: