API16:JSimpleXMLElement/ construct
From Joomla! Documentation
Description
Constructor, sets up all the default values
Syntax
__construct($name, $attrs=array(), $level=0)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | $name | |
| $attrs | array() | $attrs |
| $level | 0 | $parents |
Returns
Defined in
libraries/joomla/utilities/simplexml.php
Importing
jimport( 'joomla.utilities.simplexml' );
Source Body
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
Code Examples