8 * This source file is subject to the new BSD license that is bundled
9 * with this package in the file LICENSE.txt.
10 * It is also available through the world-wide-web at this URL:
11 * http://framework.zend.com/license/new-bsd
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@zend.com so we can send you a copy immediately.
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
25 * @see Zend_Gdata_App_Extension
27 require_once 'Zend/Gdata/App/Extension.php';
30 * Represents the atom:generator element
35 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
38 class Zend_Gdata_App_Extension_Generator extends Zend_Gdata_App_Extension
41 protected $_rootElement = 'generator';
42 protected $_uri = null;
43 protected $_version = null;
45 public function __construct($text = null, $uri = null, $version = null)
47 parent::__construct();
50 $this->_version = $version;
53 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
55 $element = parent::getDOM($doc, $majorVersion, $minorVersion);
56 if ($this->_uri !== null) {
57 $element->setAttribute('uri', $this->_uri);
59 if ($this->_version !== null) {
60 $element->setAttribute('version', $this->_version);
65 protected function takeAttributeFromDOM($attribute)
67 switch ($attribute->localName) {
69 $this->_uri = $attribute->nodeValue;
72 $this->_version= $attribute->nodeValue;
75 parent::takeAttributeFromDOM($attribute);
80 * @return Zend_Gdata_App_Extension_Uri
82 public function getUri()
88 * @param Zend_Gdata_App_Extension_Uri $value
89 * @return Zend_Gdata_App_Entry Provides a fluent interface
91 public function setUri($value)
98 * @return Zend_Gdata_App_Extension_Version
100 public function getVersion()
102 return $this->_version;
106 * @param Zend_Gdata_App_Extension_Version $value
107 * @return Zend_Gdata_App_Entry Provides a fluent interface
109 public function setVersion($value)
111 $this->_version = $value;