You are here

function JSimpleXMLElement::attributes in Ubercart 5

Get the an attribute of the element

@access public

Parameters

string $attribute The name of the attribute:

Return value

mixed If an attribute is given will return the attribute if it exist. If no attribute is given will return the complete attributes array

File

uc_store/includes/simplexml.php, line 461

Class

JSimpleXMLElement
SimpleXML Element

Code

function attributes($attribute = null) {
  if (!isset($attribute)) {
    return $this->_attributes;
  }
  return isset($this->_attributes[$attribute]) ? $this->_attributes[$attribute] : null;
}