public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     $element->setAttribute("rel", $this->lookupNamespace("gd") . '#' . $this->_rel);
     if ($this->_formattedAddress != null) {
         $element->appendChild($this->_formattedAddress->getDOM($element->ownerDocument));
     }
     if ($this->_street != null) {
         $element->appendChild($this->_street->getDOM($element->ownerDocument));
     }
     if ($this->_postcode != null) {
         $element->appendChild($this->_postcode->getDOM($element->ownerDocument));
     }
     if ($this->_pobox != null) {
         $element->appendChild($this->_pobox->getDOM($element->ownerDocument));
     }
     if ($this->_city != null) {
         $element->appendChild($this->_city->getDOM($element->ownerDocument));
     }
     if ($this->_region != null) {
         $element->appendChild($this->_region->getDOM($element->ownerDocument));
     }
     if ($this->_country != null) {
         $element->appendChild($this->_country->getDOM($element->ownerDocument));
     }
     return $element;
 }
示例#2
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'primary':
             $this->_isprimary = strcasecmp("true", $attribute->nodeValue);
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
示例#3
0
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     $element->setAttribute('rel', $this->lookupNamespace('gd') . '#' . $this->_rel);
     if ($this->_orgName != null) {
         $element->appendChild($this->_orgName->getDOM($element->ownerDocument));
     }
     if ($this->_orgTitle != null) {
         $element->appendChild($this->_orgTitle->getDOM($element->ownerDocument));
     }
     return $element;
 }
示例#4
0
 /**
  * Retrieves a DOMElement which corresponds to this element and all
  * child properties.  This is used to build an entry back into a DOM
  * and eventually XML text for sending to the server upon updates, or
  * for application storage/persistence.
  *
  * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  * @return DOMElement The DOMElement representing this element and all
  * child properties.
  */
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_fullName !== null) {
         $element->appendChild($this->_fullName->getDOM($element->ownerDocument));
     }
     if ($this->_namePrefix !== null) {
         $element->appendChild($this->_namePrefix->getDOM($element->ownerDocument));
     }
     if ($this->_givenName !== null) {
         $element->appendChild($this->_givenName->getDOM($element->ownerDocument));
     }
     if ($this->_familyName !== null) {
         $element->appendChild($this->_familyName->getDOM($element->ownerDocument));
     }
     return $element;
 }