4include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
26 $this->add_header = $a_add_header;
27 parent::__construct();
37 $this->obj_id = $a_obj_id;
48 if ($this->add_header) {
51 $this->weblink->toXML($this);
60 $this->
xmlSetDtdDef(
"<!DOCTYPE WebLinks PUBLIC \"-//ILIAS//DTD WebLinkAdministration//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_weblinks_5_1.dtd\">");
78 throw new UnexpectedValueException(
'No obj_id given: ');
80 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
82 throw new UnexpectedValueException(
'Invalid obj_id given: ' . $this->obj_id);
84 if ($this->weblink->getType() !=
'webr') {
85 throw new UnexpectedValueException(
'Invalid obj_id given. Object is not of type webr');
An exception for terminatinating execution or to throw for unit testing.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
buildHeader()
Build XML header.
setObjId($a_obj_id)
Set obj_id of weblink object.
__construct($a_add_header)
Constructor.
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlClear()
clears xmlStr @access public
xmlHeader()
Writes xml header @access public.
xmlSetDtdDef($dtdDef)
Sets dtd definition.