示例#1
0
 /**
  * Sets a known attribute of Category from an XML reader.
  *
  * @param \XMLReader $xml The reader.
  *
  * @return bool Whether an attribute was set.
  */
 protected function setKnownAttribute($xml)
 {
     if (parent::setKnownAttribute($xml)) {
         return true;
     } else {
         if ($xml->localName == 'scheme' && empty($xml->namespaceURI)) {
             $this->scheme = $xml->value;
             return true;
         } else {
             if ($xml->localName == 'term' && empty($xml->namespaceURI)) {
                 $this->term = $xml->value;
                 return true;
             } else {
                 if ($xml->localName == 'label' && empty($xml->namespaceURI)) {
                     $this->label = $xml->value;
                     return true;
                 }
             }
         }
     }
     return false;
 }
示例#2
0
 /**
  * Sets a known attribute of ExtensibleElement from an XML reader.
  *
  * @param \XMLReader $xml The reader.
  *
  * @return bool Whether an attribute was set.
  */
 protected function setKnownAttribute($xml)
 {
     if (parent::setKnownAttribute($xml)) {
         return true;
     }
     return false;
 }