File indexing completed on 2025-01-26 05:29:33
0001 <?php 0002 0003 /** 0004 * Zend Framework 0005 * 0006 * LICENSE 0007 * 0008 * This source file is subject to the new BSD license that is bundled 0009 * with this package in the file LICENSE.txt. 0010 * It is also available through the world-wide-web at this URL: 0011 * http://framework.zend.com/license/new-bsd 0012 * If you did not receive a copy of the license and are unable to 0013 * obtain it through the world-wide-web, please send an email 0014 * to license@zend.com so we can send you a copy immediately. 0015 * 0016 * @category Zend 0017 * @package Zend_Gdata 0018 * @subpackage Calendar 0019 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0020 * @license http://framework.zend.com/license/new-bsd New BSD License 0021 * @version $Id$ 0022 */ 0023 0024 /** 0025 * @see Zend_Gdata_Feed 0026 */ 0027 // require_once 'Zend/Gdata/Feed.php'; 0028 0029 /** 0030 * @see Zend_Gdata_Extension_Timezone 0031 */ 0032 // require_once 'Zend/Gdata/Calendar/Extension/Timezone.php'; 0033 0034 /** 0035 * Represents the meta-feed list of calendars 0036 * 0037 * @category Zend 0038 * @package Zend_Gdata 0039 * @subpackage Calendar 0040 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0041 * @license http://framework.zend.com/license/new-bsd New BSD License 0042 */ 0043 class Zend_Gdata_Calendar_ListFeed extends Zend_Gdata_Feed 0044 { 0045 protected $_timezone = null; 0046 0047 /** 0048 * The classname for individual feed elements. 0049 * 0050 * @var string 0051 */ 0052 protected $_entryClassName = 'Zend_Gdata_Calendar_ListEntry'; 0053 0054 /** 0055 * The classname for the feed. 0056 * 0057 * @var string 0058 */ 0059 protected $_feedClassName = 'Zend_Gdata_Calendar_ListFeed'; 0060 0061 public function __construct($element = null) 0062 { 0063 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces); 0064 parent::__construct($element); 0065 } 0066 0067 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 0068 { 0069 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 0070 if ($this->_timezone != null) { 0071 $element->appendChild($this->_timezone->getDOM($element->ownerDocument)); 0072 } 0073 return $element; 0074 } 0075 0076 protected function takeChildFromDOM($child) 0077 { 0078 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 0079 switch ($absoluteNodeName) { 0080 case $this->lookupNamespace('gCal') . ':' . 'timezone'; 0081 $timezone = new Zend_Gdata_Calendar_Extension_Timezone(); 0082 $timezone->transferFromDOM($child); 0083 $this->_timezone = $timezone; 0084 break; 0085 default: 0086 parent::takeChildFromDOM($child); 0087 break; 0088 } 0089 } 0090 0091 public function getTimezone() 0092 { 0093 return $this->_timezone; 0094 } 0095 0096 /** 0097 * @param Zend_Gdata_Calendar_Extension_Timezone $value 0098 * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface 0099 */ 0100 public function setTimezone($value) 0101 { 0102 $this->_timezone = $value; 0103 return $this; 0104 } 0105 0106 }