ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
php4DOMElement Class Reference

php4DomElement More...

+ Inheritance diagram for php4DOMElement:
+ Collaboration diagram for php4DOMElement:

Public Member Functions

 get_attribute ($name)
 
 owner_document ()
 
 get_elements_by_tagname ($name)
 
 has_attribute ($name)
 
 remove_attribute ($name)
 
 set_attribute ($name, $value)
 
 tagname ()
 
 set_content ($text)
 
 get_content ()
 
 unlink ($aDomNode)
 
- Public Member Functions inherited from php4DOMNode
 __construct ($aDomNode)
 
 append_child ($newnode)
 
 replace_node ($newnode)
 
 append_sibling ($newnode)
 
 attributes ()
 
 child_nodes ()
 
 children ()
 
 unlink_node ($aDomNode="")
 
 clone_node ($deep=false)
 
 first_child ()
 
 get_content ()
 
 has_attributes ()
 
 has_child_nodes ()
 
 insert_before ($newnode, $refnode)
 
 last_child ()
 
 next_sibling ()
 
 node_name ($a_local=false)
 
 node_type ()
 
 node_value ()
 
 parent_node ()
 
 previous_sibling ()
 
 remove_child ($oldchild)
 
 replace_child ($oldnode, $newnode)
 
 set_content ($text)
 

Additional Inherited Members

- Data Fields inherited from php4DOMNode
 $myDOMNode
 

Detailed Description

php4DomElement

Definition at line 256 of file inc.xml5compliance.php.

Member Function Documentation

◆ get_attribute()

php4DOMElement::get_attribute (   $name)

Definition at line 258 of file inc.xml5compliance.php.

References $name.

Referenced by ilPageObject\getAllPCIds(), ilPCMediaObject\getCaptionClass(), ilPCMediaObject\getClass(), ilPageObject\getDuplicatePCIds(), and ilPageObject\getParentContentObjectForPcId().

259  {
260  return $this->myDOMNode->getAttribute($name);
261  }
if($format !==null) $name
Definition: metadata.php:247
+ Here is the caller graph for this function:

◆ get_content()

php4DOMElement::get_content ( )

Definition at line 321 of file inc.xml5compliance.php.

322  {
323  $text_node = $this->myDOMNode->firstChild;
324 
325  if (is_object($text_node)) {
326  return $text_node->textContent;
327  } else {
328  return "";
329  }
330  }

◆ get_elements_by_tagname()

php4DOMElement::get_elements_by_tagname (   $name)

Definition at line 268 of file inc.xml5compliance.php.

References $i, and $name.

269  {
270  $myDOMNodeList = $this->myDOMNode->getElementsByTagName($name);
271  $nodeSet = array();
272  $i = 0;
273  while ($node = $myDOMNodeList->item($i)) {
274  $nodeSet[] = new php4DOMElement($node);
275  $i++;
276  }
277 
278  return $nodeSet;
279  }
if($format !==null) $name
Definition: metadata.php:247
php4DomElement
$i
Definition: metadata.php:41

◆ has_attribute()

php4DOMElement::has_attribute (   $name)

Definition at line 281 of file inc.xml5compliance.php.

References $name.

Referenced by ilDOMUtil\set_attributes(), ilPCMediaObject\setCaptionClass(), and ilPCMediaObject\setClass().

282  {
283  return $this->myDOMNode->hasAttribute($name);
284  }
if($format !==null) $name
Definition: metadata.php:247
+ Here is the caller graph for this function:

◆ owner_document()

php4DOMElement::owner_document ( )

Definition at line 263 of file inc.xml5compliance.php.

Referenced by ilPCTable\extractText().

264  {
265  return new php4DOMDocument($this->myDOMNode->ownerDocument);
266  }
+ Here is the caller graph for this function:

◆ remove_attribute()

php4DOMElement::remove_attribute (   $name)

Definition at line 286 of file inc.xml5compliance.php.

References $name.

Referenced by ilDOMUtil\set_attributes(), ilPCMediaObject\setCaptionClass(), and ilPCMediaObject\setClass().

287  {
288  return $this->myDOMNode->removeAttribute($name);
289  }
if($format !==null) $name
Definition: metadata.php:247
+ Here is the caller graph for this function:

◆ set_attribute()

php4DOMElement::set_attribute (   $name,
  $value 
)

Definition at line 291 of file inc.xml5compliance.php.

References $name.

Referenced by ilPCTable\importCellAttributes(), ilMediaAliasItem\insert(), ilDOMUtil\set_attributes(), ilPCMediaObject\setCaptionClass(), and ilPCMediaObject\setClass().

292  {
293  return $this->myDOMNode->setAttribute($name, $value);
294  }
if($format !==null) $name
Definition: metadata.php:247
+ Here is the caller graph for this function:

◆ set_content()

php4DOMElement::set_content (   $text)

Definition at line 302 of file inc.xml5compliance.php.

Referenced by ilPageObject\setParagraphContent().

303  {
304  // the following replace has been added to conform with PHP4.
305  // A set_content("&") brought a get_content() = "&" there,
306  // whereas PHP5 gives a get_content() = "&"
307  $text = str_replace("&lt;", "<", $text);
308  $text = str_replace("&gt;", ">", $text);
309  $text = str_replace("&amp;", "&", $text);
310 
311  $text_node = new DOMText();
312  $text_node->appendData($text);
313  if (is_object($this->myDOMNode->firstChild)) {
314  $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
315  } else {
316  $this->myDOMNode->appendChild($text_node);
317  }
318  }
+ Here is the caller graph for this function:

◆ tagname()

php4DOMElement::tagname ( )

Definition at line 296 of file inc.xml5compliance.php.

297  {
298  return $this->myDOMNode->tagName;
299  }

◆ unlink()

php4DOMElement::unlink (   $aDomNode)

Definition at line 333 of file inc.xml5compliance.php.

334  {
335  parent::unlink_node($aDomNode);
336  }

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