Example #1
0
 /**
  * Sets a known attribute of NameForm from an XML reader.
  *
  * @param \XMLReader $xml The reader.
  *
  * @return bool Whether an attribute was set.
  */
 protected function setKnownAttribute(\XMLReader $xml)
 {
     if (parent::setKnownAttribute($xml)) {
         return true;
     } else {
         if ($xml->localName == 'lang' && $xml->namespaceURI == 'http://www.w3.org/XML/1998/namespace') {
             $this->lang = $xml->value;
             return true;
         }
     }
     return false;
 }
Example #2
0
 /**
  * Sets a known attribute of NamePart from an XML reader.
  *
  * @param \XMLReader $xml The reader.
  *
  * @return bool Whether an attribute was set.
  */
 protected function setKnownAttribute(\XMLReader $xml)
 {
     if (parent::setKnownAttribute($xml)) {
         return true;
     } else {
         if ($xml->localName == 'value' && empty($xml->namespaceURI)) {
             $this->value = $xml->value;
             return true;
         } else {
             if ($xml->localName == 'type' && empty($xml->namespaceURI)) {
                 $this->type = $xml->value;
                 return true;
             }
         }
     }
     return false;
 }
Example #3
0
 /**
  * Sets a known attribute of Address 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;
 }