diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Gdata/App/Extension/Generator.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Gdata/App/Extension/Generator.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,115 @@ +_text = $text; + $this->_uri = $uri; + $this->_version = $version; + } + + public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) + { + $element = parent::getDOM($doc, $majorVersion, $minorVersion); + if ($this->_uri !== null) { + $element->setAttribute('uri', $this->_uri); + } + if ($this->_version !== null) { + $element->setAttribute('version', $this->_version); + } + return $element; + } + + protected function takeAttributeFromDOM($attribute) + { + switch ($attribute->localName) { + case 'uri': + $this->_uri = $attribute->nodeValue; + break; + case 'version': + $this->_version= $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * @return Zend_Gdata_App_Extension_Uri + */ + public function getUri() + { + return $this->_uri; + } + + /** + * @param Zend_Gdata_App_Extension_Uri $value + * @return Zend_Gdata_App_Entry Provides a fluent interface + */ + public function setUri($value) + { + $this->_uri = $value; + return $this; + } + + /** + * @return Zend_Gdata_App_Extension_Version + */ + public function getVersion() + { + return $this->_version; + } + + /** + * @param Zend_Gdata_App_Extension_Version $value + * @return Zend_Gdata_App_Entry Provides a fluent interface + */ + public function setVersion($value) + { + $this->_version = $value; + return $this; + } + +}