ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDomDocument Class Reference

Dom document wrapper. More...

+ Collaboration diagram for ilDomDocument:

Public Member Functions

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

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

◆ __construct()

ilDomDocument::__construct ( )

Constructor.

Parameters
DOMDocumentPHP dom document

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

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

Member Function Documentation

◆ __call()

ilDomDocument::__call (   $a_method,
  $a_args 
)

Call.

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

29 {
30 if (in_array($a_method, array("validate", "loadXML"))) {
31 set_error_handler(array($this, "handleError"));
32 $rv = call_user_func_array(array($this->doc, $a_method), $a_args);
33 restore_error_handler();
34 return $rv;
35 } else {
36 return call_user_func_array(array($this->doc, $a_method), $a_args);
37 }
38 }

◆ __get()

ilDomDocument::__get (   $a_mem)

Get.

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

44 {
45 if ($a_mem == "errors") {
46 return $this->errors;
47 } else {
48 return $this->doc->$a_mem;
49 }
50 }

References $errors.

◆ __set()

ilDomDocument::__set (   $a_mem,
  $a_val 
)

Set.

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

56 {
57 $this->_delegate->$a_mem = $a_val;
58 }

◆ handleError()

ilDomDocument::handleError (   $a_no,
  $a_string,
  $a_file = null,
  $a_line = null,
  $a_context = null 
)

Handle error.

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

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

Field Documentation

◆ $doc

ilDomDocument::$doc
private

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

◆ $errors

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: