_countHint = $countHint; $this->_href = $href; $this->_readOnly = $readOnly; $this->_rel = $rel; $this->_feed = $feed; } public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) { $element = parent::getDOM($doc, $majorVersion, $minorVersion); if ($this->_countHint !== null) { $element->setAttribute('countHint', $this->_countHint); } if ($this->_href !== null) { $element->setAttribute('href', $this->_href); } if ($this->_readOnly !== null) { $element->setAttribute('readOnly', ($this->_readOnly ? "true" : "false")); } if ($this->_rel !== null) { $element->setAttribute('rel', $this->_rel); } if ($this->_feed !== null) { $element->appendChild($this->_feed->getDOM($element->ownerDocument)); } return $element; } protected function takeChildFromDOM($child) { $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; switch ($absoluteNodeName) { case $this->lookupNamespace('atom') . ':' . 'feed'; $feed = new Zend_Gdata_Feed(); $feed->transferFromDOM($child); $this->_feed = $feed; break; default: parent::takeChildFromDOM($child); break; } } protected function takeAttributeFromDOM($attribute) { switch ($attribute->localName) { case 'countHint': $this->_countHint = $attribute->nodeValue; break; case 'href': $this->_href = $attribute->nodeValue; break; case 'readOnly': if ($attribute->nodeValue == "true") { $this->_readOnly = true; } else if ($attribute->nodeValue == "false") { $this->_readOnly = false; } else { throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); } break; case 'rel': $this->_rel = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } } /** * @return string */ public function getHref() { return $this->_href; } public function setHref($value) { $this->_href = $value; return $this; } public function getReadOnly() { return $this->_readOnly; } public function setReadOnly($value) { $this->_readOnly = $value; return $this; } public function getRel() { return $this->_rel; } public function setRel($value) { $this->_rel = $value; return $this; } public function getFeed() { return $this->_feed; } public function setFeed($value) { $this->_feed = $value; return $this; } }