JSimpleXMLElement/attributes
From Joomla! Documentation
< API15:JSimpleXMLElementRevision as of 17:25, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Get the an attribute of the element
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<...)
Revision as of 17:25, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Get the an attribute of the element
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<...)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The "API15" 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]
Get the an attribute of the element
Template:Description:JSimpleXMLElement/attributes
Syntax[edit]
attributes($attribute=null)
Parameter Name | Default Value | Description |
---|---|---|
$attribute | null | $attribute The name of the attribute |
Returns[edit]
mixed If an attribute is given will return the attribute if it exist. If no attribute is given will return the complete attributes array
Defined in[edit]
libraries/joomla/utilities/simplexml.php
Importing[edit]
jimport( 'joomla.utilities.simplexml' );
Source Body[edit]
function attributes($attribute = null)
{
if(!isset($attribute)) {
return $this->_attributes;
}
return isset($this->_attributes[$attribute]) ? $this->_attributes[$attribute] : null;
}
[Edit See Also] Template:SeeAlso:JSimpleXMLElement/attributes
Examples[edit]
<CodeExamplesForm />