JSimpleXMLElement/ construct
From Joomla! Documentation
< API16:JSimpleXMLElement
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Constructor, sets up all the default values
Syntax[edit]
__construct($name, $attrs=array(), $level=0)
Parameter Name | Default Value | Description |
---|---|---|
$name | $name | |
$attrs | array() | $attrs |
$level | 0 | $parents |
Returns[edit]
Defined in[edit]
libraries/joomla/utilities/simplexml.php
Importing[edit]
jimport( 'joomla.utilities.simplexml' );
Source Body[edit]
function __construct($name, $attrs = array(), $level = 0)
{
//Make the keys of the attr array lower case, and store the value
$this->_attributes = array_change_key_case($attrs, CASE_LOWER);
//Make the name lower case and store the value
$this->_name = strtolower($name);
//Set the level
$this->_level = $level;
}
Examples[edit]
Code Examples[edit]