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.
18 * @subpackage Calendar
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_Feed
27 require_once 'Zend/Gdata/Feed.php';
30 * @see Zend_Gdata_Extension_Timezone
32 require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
35 * Data model for a Google Calendar feed of events
39 * @subpackage Calendar
40 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
41 * @license http://framework.zend.com/license/new-bsd New BSD License
43 class Zend_Gdata_Calendar_EventFeed extends Zend_Gdata_Feed
46 protected $_timezone = null;
49 * The classname for individual feed elements.
53 protected $_entryClassName = 'Zend_Gdata_Calendar_EventEntry';
56 * The classname for the feed.
60 protected $_feedClassName = 'Zend_Gdata_Calendar_EventFeed';
62 public function __construct($element = null)
64 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
65 parent::__construct($element);
68 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
70 $element = parent::getDOM($doc, $majorVersion, $minorVersion);
71 if ($this->_timezone != null) {
72 $element->appendChild($this->_timezone->getDOM($element->ownerDocument));
78 protected function takeChildFromDOM($child)
80 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
82 switch ($absoluteNodeName) {
83 case $this->lookupNamespace('gCal') . ':' . 'timezone';
84 $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
85 $timezone->transferFromDOM($child);
86 $this->_timezone = $timezone;
90 parent::takeChildFromDOM($child);
95 public function getTimezone()
97 return $this->_timezone;
100 public function setTimezone($value)
102 $this->_timezone = $value;