Actions

API16

JSimpleXMLElement/ construct

From Joomla! Documentation

< API16:JSimpleXMLElement
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Constructor, sets up all the default values

[Edit Descripton]

Description:JSimpleXMLElement/ construct

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

[Edit See Also] SeeAlso:JSimpleXMLElement/ construct

Examples

<CodeExamplesForm />