ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDomDocument Class Reference

Dom document wrapper. More...

+ Collaboration diagram for ilDomDocument:

Public Member Functions

 __construct ()
 Constructor.
 __call ($a_method, $a_args)
 Call.
 __get ($a_mem)
 Get.
 __set ($a_mem, $a_val)
 Set.
 handleError ($a_no, $a_string, $a_file=null, $a_line=null, $a_context=null)
 Handle error.

Private Attributes

 $doc
 $errors = array()

Detailed Description

Dom document wrapper.

Author
author alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ /

Definition at line 11 of file class.ilDomDocument.php.

Constructor & Destructor Documentation

ilDomDocument::__construct ( )

Constructor.

Parameters
DOMDocumentPHP dom document

Definition at line 20 of file class.ilDomDocument.php.

{
$this->doc = new DOMDocument();
}

Member Function Documentation

ilDomDocument::__call (   $a_method,
  $a_args 
)

Call.

Definition at line 28 of file class.ilDomDocument.php.

{
if (in_array($a_method, array("validate", "loadXML")))
{
set_error_handler(array($this, "handleError"));
$rv = call_user_func_array(array($this->doc, $a_method), $a_args);
restore_error_handler();
return $rv;
}
else
{
return call_user_func_array(array($this->doc, $a_method), $a_args);
}
}
ilDomDocument::__get (   $a_mem)

Get.

Definition at line 46 of file class.ilDomDocument.php.

References $errors.

{
if ($a_mem == "errors")
{
return $this->errors;
}
else
{
return $this->doc->$a_mem;
}
}
ilDomDocument::__set (   $a_mem,
  $a_val 
)

Set.

Definition at line 61 of file class.ilDomDocument.php.

{
$this->_delegate->$a_mem = $a_val;
}
ilDomDocument::handleError (   $a_no,
  $a_string,
  $a_file = null,
  $a_line = null,
  $a_context = null 
)

Handle error.

Definition at line 69 of file class.ilDomDocument.php.

{
$pos = strpos($a_string, "]:");
$err = trim(substr($a_string, $pos + 2));
$this->errors[] = $err;
}

Field Documentation

ilDomDocument::$doc
private

Definition at line 13 of file class.ilDomDocument.php.

ilDomDocument::$errors = array()
private

Definition at line 14 of file class.ilDomDocument.php.

Referenced by __get().


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