ILIAS  release_7 Revision v7.30-3-g800a261c036
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)
 
 get_attribute ($name)
 
 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)
 
 php4DOMNode ($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 ()
 
 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 254 of file inc.xml5compliance.php.

Member Function Documentation

◆ get_attribute() [1/2]

php4DOMElement::get_attribute (   $name)

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

257 {
258 return $this->myDOMNode->getAttribute($name);
259 }
if($format !==null) $name
Definition: metadata.php:230

References $name.

◆ get_attribute() [2/2]

php4DOMElement::get_attribute (   $name)

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

199 {
200 return $this->myDOMNode->getAttribute($name);
201 }

References $name.

◆ get_content() [1/2]

php4DOMElement::get_content ( )

Reimplemented from php4DOMNode.

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

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

◆ get_content() [2/2]

php4DOMElement::get_content ( )

Reimplemented from php4DOMNode.

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

257 {
258 $text_node = &$this->myDOMNode->firstChild;
259
260 if (is_object($text_node)) {
261 return $text_node->textContent;
262 } else {
263 return "";
264 }
265 }

◆ get_elements_by_tagname() [1/2]

php4DOMElement::get_elements_by_tagname (   $name)

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

267 {
268 $myDOMNodeList = $this->myDOMNode->getElementsByTagName($name);
269 $nodeSet = array();
270 $i = 0;
271 while ($node = $myDOMNodeList->item($i)) {
272 $nodeSet[] = new php4DOMElement($node);
273 $i++;
274 }
275
276 return $nodeSet;
277 }
$i
Definition: metadata.php:24

References $i, and $name.

◆ get_elements_by_tagname() [2/2]

php4DOMElement::get_elements_by_tagname (   $name)

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

204 {
205 $myDOMNodeList = $this->myDOMNode->getElementsByTagName($name);
206 $nodeSet = array();
207 $i = 0;
208 while ($node = $myDOMNodeList->item($i)) {
209 $nodeSet[] = new php4DOMElement($node);
210 $i++;
211 }
212
213 return $nodeSet;
214 }

References $i, and $name.

◆ has_attribute() [1/2]

php4DOMElement::has_attribute (   $name)

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

280 {
281 return $this->myDOMNode->hasAttribute($name);
282 }

References $name.

◆ has_attribute() [2/2]

php4DOMElement::has_attribute (   $name)

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

217 {
218 return $this->myDOMNode->hasAttribute($name);
219 }

References $name.

◆ owner_document()

php4DOMElement::owner_document ( )

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

262 {
263 return new php4DOMDocument($this->myDOMNode->ownerDocument);
264 }

◆ remove_attribute() [1/2]

php4DOMElement::remove_attribute (   $name)

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

285 {
286 return $this->myDOMNode->removeAttribute($name);
287 }

References $name.

◆ remove_attribute() [2/2]

php4DOMElement::remove_attribute (   $name)

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

222 {
223 return $this->myDOMNode->removeAttribute($name);
224 }

References $name.

◆ set_attribute() [1/2]

php4DOMElement::set_attribute (   $name,
  $value 
)

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

290 {
291 return $this->myDOMNode->setAttribute($name, $value);
292 }

References $name.

◆ set_attribute() [2/2]

php4DOMElement::set_attribute (   $name,
  $value 
)

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

227 {
228 return $this->myDOMNode->setAttribute($name, $value);
229 }

References $name.

◆ set_content() [1/2]

php4DOMElement::set_content (   $text)

Reimplemented from php4DOMNode.

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

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

◆ set_content() [2/2]

php4DOMElement::set_content (   $text)

Reimplemented from php4DOMNode.

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

238 {
239 // the following replace has been added to conform with PHP4.
240 // A set_content("&amp;") brought a get_content() = "&" there,
241 // whereas PHP5 gives a get_content() = "&amp;"
242 $text = str_replace("&lt;", "<", $text);
243 $text = str_replace("&gt;", ">", $text);
244 $text = str_replace("&amp;", "&", $text);
245
246 $text_node = new DOMText();
247 $text_node->appendData($text);
248 if (is_object($this->myDOMNode->firstChild)) {
249 $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
250 } else {
251 $this->myDOMNode->appendChild($text_node);
252 }
253 }

◆ tagname() [1/2]

php4DOMElement::tagname ( )

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

295 {
296 return $this->myDOMNode->tagName;
297 }

◆ tagname() [2/2]

php4DOMElement::tagname ( )

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

232 {
233 return $this->myDOMNode->tagName;
234 }

◆ unlink() [1/2]

php4DOMElement::unlink (   $aDomNode)

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

332 {
333 parent::unlink_node($aDomNode);
334 }

◆ unlink() [2/2]

php4DOMElement::unlink (   $aDomNode)

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

269 {
270 parent::unlink_node($aDomNode);
271 }

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