Exemple #1
0
 public function loadAttribute($sName, $sNamespace = '', $bDebug = true)
 {
     if ($sNamespace) {
         $result = parent::getAttributeNodeNS($sNamespace, $sName);
     } else {
         $result = parent::getAttributeNode($sName);
     }
     if (!$result && $bDebug) {
         $this->throwException(sprintf('No result for @attribute %s:%s', $sNamespace, $sName));
     }
     return $result;
 }
Exemple #2
0
 /**
  * Get an attribute value
  *
  * @param string $name
  * @return Attribute|\DOMAttr
  */
 public function getAttributeNode($name)
 {
     list($namespace, $localName) = $this->resolveTagName($name);
     if ($namespace != '') {
         return parent::getAttributeNodeNS($namespace, $localName);
     } else {
         return parent::getAttributeNode($name);
     }
 }