[44] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * Zend Framework
|
---|
| 5 | *
|
---|
| 6 | * LICENSE
|
---|
| 7 | *
|
---|
| 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.
|
---|
| 15 | *
|
---|
| 16 | * @category Zend
|
---|
| 17 | * @package Zend_Gdata
|
---|
| 18 | * @subpackage Calendar
|
---|
| 19 | * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
---|
| 20 | * @license http://framework.zend.com/license/new-bsd New BSD License
|
---|
| 21 | */
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * @see Zend_Gdata_Feed
|
---|
| 25 | */
|
---|
| 26 | require_once 'Zend/Gdata/Feed.php';
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * @see Zend_Gdata_Extension_Timezone
|
---|
| 30 | */
|
---|
| 31 | require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
|
---|
| 32 |
|
---|
| 33 | /**
|
---|
| 34 | * Represents the meta-feed list of calendars
|
---|
| 35 | *
|
---|
| 36 | * @category Zend
|
---|
| 37 | * @package Zend_Gdata
|
---|
| 38 | * @subpackage Calendar
|
---|
| 39 | * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
---|
| 40 | * @license http://framework.zend.com/license/new-bsd New BSD License
|
---|
| 41 | */
|
---|
| 42 | class Zend_Gdata_Calendar_ListFeed extends Zend_Gdata_Feed
|
---|
| 43 | {
|
---|
| 44 | protected $_timezone = null;
|
---|
| 45 |
|
---|
| 46 | /**
|
---|
| 47 | * The classname for individual feed elements.
|
---|
| 48 | *
|
---|
| 49 | * @var string
|
---|
| 50 | */
|
---|
| 51 | protected $_entryClassName = 'Zend_Gdata_Calendar_ListEntry';
|
---|
| 52 |
|
---|
| 53 | /**
|
---|
| 54 | * The classname for the feed.
|
---|
| 55 | *
|
---|
| 56 | * @var string
|
---|
| 57 | */
|
---|
| 58 | protected $_feedClassName = 'Zend_Gdata_Calendar_ListFeed';
|
---|
| 59 |
|
---|
| 60 | public function __construct($element = null)
|
---|
| 61 | {
|
---|
| 62 | $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
|
---|
| 63 | parent::__construct($element);
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
---|
| 67 | {
|
---|
| 68 | $element = parent::getDOM($doc, $majorVersion, $minorVersion);
|
---|
| 69 | if ($this->_timezone != null) {
|
---|
| 70 | $element->appendChild($this->_timezone->getDOM($element->ownerDocument));
|
---|
| 71 | }
|
---|
| 72 | return $element;
|
---|
| 73 | }
|
---|
| 74 |
|
---|
| 75 | protected function takeChildFromDOM($child)
|
---|
| 76 | {
|
---|
| 77 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
|
---|
| 78 | switch ($absoluteNodeName) {
|
---|
| 79 | case $this->lookupNamespace('gCal') . ':' . 'timezone';
|
---|
| 80 | $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
|
---|
| 81 | $timezone->transferFromDOM($child);
|
---|
| 82 | $this->_timezone = $timezone;
|
---|
| 83 | break;
|
---|
| 84 | default:
|
---|
| 85 | parent::takeChildFromDOM($child);
|
---|
| 86 | break;
|
---|
| 87 | }
|
---|
| 88 | }
|
---|
| 89 |
|
---|
| 90 | public function getTimezone()
|
---|
| 91 | {
|
---|
| 92 | return $this->_timezone;
|
---|
| 93 | }
|
---|
| 94 |
|
---|
| 95 | /**
|
---|
| 96 | * @param Zend_Gdata_Calendar_Extension_Timezone $value
|
---|
| 97 | * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface
|
---|
| 98 | */
|
---|
| 99 | public function setTimezone($value)
|
---|
| 100 | {
|
---|
| 101 | $this->_timezone = $value;
|
---|
| 102 | return $this;
|
---|
| 103 | }
|
---|
| 104 |
|
---|
| 105 | }
|
---|