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.
Contents
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;
}