XML writer for weblinks.
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 weblinks.
- 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.ilWebLinkXmlWriter.php.
Constructor & Destructor Documentation
| ilWebLinkXmlWriter::__construct |
( |
|
$a_add_header | ) |
|
Member Function Documentation
| ilWebLinkXmlWriter::buildHeader |
( |
| ) |
|
|
protected |
| ilWebLinkXmlWriter::init |
( |
| ) |
|
|
protected |
Init xml writer.
- Returns
- bool
- Exceptions
-
| UnexpectedValueException | Thrown if obj_id is not of type webr |
Definition at line 74 of file class.ilWebLinkXmlWriter.php.
References ilObjectFactory\getInstanceByObjId(), and ilXmlWriter\xmlClear().
Referenced by write().
{
if(!$this->obj_id)
{
throw new UnexpectedValueException('No obj_id given: ');
}
include_once './classes/class.ilObjectFactory.php';
{
throw new UnexpectedValueException('Invalid obj_id given: '.$this->obj_id);
}
if($this->weblink->getType() != 'webr')
{
throw new UnexpectedValueException('Invalid obj_id given. Object is not of type webr');
}
}
| ilWebLinkXmlWriter::setObjId |
( |
|
$a_obj_id | ) |
|
| ilWebLinkXmlWriter::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.ilWebLinkXmlWriter.php.
References buildHeader(), and init().
{
if($this->add_header)
{
}
$this->weblink->toXML($this);
}
Field Documentation
| ilWebLinkXmlWriter::$add_header = true |
|
private |
| ilWebLinkXmlWriter::$obj_id = 0 |
|
private |
| ilWebLinkXmlWriter::$weblink = null |
|
private |
The documentation for this class was generated from the following file: