XML writer for weblinks.
More...
|
| | __construct ($a_add_header) |
| | Constructor. More...
|
| |
| | setObjId ($a_obj_id) |
| | Set obj_id of weblink object. More...
|
| |
| | write () |
| | Write XML. More...
|
| |
| | __construct ($version="1.0", $outEnc="utf-8", $inEnc="utf-8") |
| | constructor More...
|
| |
| | _ilXmlWriter () |
| | destructor @access 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 @access 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 @access public More...
|
| |
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.
◆ __construct()
| ilWebLinkXmlWriter::__construct |
( |
|
$a_add_header | ) |
|
◆ buildHeader()
| ilWebLinkXmlWriter::buildHeader |
( |
| ) |
|
|
protected |
◆ init()
| ilWebLinkXmlWriter::init |
( |
| ) |
|
|
protected |
Init xml writer.
- Returns
- bool
- Exceptions
-
| UnexpectedValueException | Thrown if obj_id is not of type webr |
Definition at line 73 of file class.ilWebLinkXmlWriter.php.
74 {
76
77 if (!$this->obj_id) {
78 throw new UnexpectedValueException('No obj_id given: ');
79 }
80 include_once './Services/Object/classes/class.ilObjectFactory.php';
82 throw new UnexpectedValueException('Invalid obj_id given: ' . $this->obj_id);
83 }
84 if ($this->weblink->getType() != 'webr') {
85 throw new UnexpectedValueException('Invalid obj_id given. Object is not of type webr');
86 }
87 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
xmlClear()
clears xmlStr @access public
References ilObjectFactory\getInstanceByObjId(), and ilXmlWriter\xmlClear().
Referenced by write().
◆ setObjId()
| ilWebLinkXmlWriter::setObjId |
( |
|
$a_obj_id | ) |
|
Set obj_id of weblink object.
- Parameters
-
- Returns
- bool
Definition at line 35 of file class.ilWebLinkXmlWriter.php.
36 {
37 $this->obj_id = $a_obj_id;
38 }
◆ write()
| 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.
46 {
48 if ($this->add_header) {
50 }
51 $this->weblink->toXML($this);
52 }
buildHeader()
Build XML header.
References buildHeader(), and init().
◆ $add_header
| ilWebLinkXmlWriter::$add_header = true |
|
private |
◆ $obj_id
| ilWebLinkXmlWriter::$obj_id = 0 |
|
private |
◆ $weblink
| ilWebLinkXmlWriter::$weblink = null |
|
private |
The documentation for this class was generated from the following file: