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 * Represents the meta-feed list of calendars
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_ListFeed extends Zend_Gdata_Feed
45 protected $_timezone = null;
48 * The classname for individual feed elements.
52 protected $_entryClassName = 'Zend_Gdata_Calendar_ListEntry';
55 * The classname for the feed.
59 protected $_feedClassName = 'Zend_Gdata_Calendar_ListFeed';
61 public function __construct($element = null)
63 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
64 parent::__construct($element);
67 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
69 $element = parent::getDOM($doc, $majorVersion, $minorVersion);
70 if ($this->_timezone != null) {
71 $element->appendChild($this->_timezone->getDOM($element->ownerDocument));
76 protected function takeChildFromDOM($child)
78 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
79 switch ($absoluteNodeName) {
80 case $this->lookupNamespace('gCal') . ':' . 'timezone';
81 $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
82 $timezone->transferFromDOM($child);
83 $this->_timezone = $timezone;
86 parent::takeChildFromDOM($child);
91 public function getTimezone()
93 return $this->_timezone;
97 * @param Zend_Gdata_Calendar_Extension_Timezone $value
98 * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface
100 public function setTimezone($value)
102 $this->_timezone = $value;