|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Feed.php'; 00028 00032 require_once 'Zend/Gdata/Calendar/Extension/Timezone.php'; 00033 00043 class Zend_Gdata_Calendar_EventFeed extends Zend_Gdata_Feed 00044 { 00045 00046 protected $_timezone = null; 00047 00053 protected $_entryClassName = 'Zend_Gdata_Calendar_EventEntry'; 00054 00060 protected $_feedClassName = 'Zend_Gdata_Calendar_EventFeed'; 00061 00062 public function __construct($element = null) 00063 { 00064 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces); 00065 parent::__construct($element); 00066 } 00067 00068 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00069 { 00070 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00071 if ($this->_timezone != null) { 00072 $element->appendChild($this->_timezone->getDOM($element->ownerDocument)); 00073 } 00074 00075 return $element; 00076 } 00077 00078 protected function takeChildFromDOM($child) 00079 { 00080 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00081 00082 switch ($absoluteNodeName) { 00083 case $this->lookupNamespace('gCal') . ':' . 'timezone'; 00084 $timezone = new Zend_Gdata_Calendar_Extension_Timezone(); 00085 $timezone->transferFromDOM($child); 00086 $this->_timezone = $timezone; 00087 break; 00088 00089 default: 00090 parent::takeChildFromDOM($child); 00091 break; 00092 } 00093 } 00094 00095 public function getTimezone() 00096 { 00097 return $this->_timezone; 00098 } 00099 00100 public function setTimezone($value) 00101 { 00102 $this->_timezone = $value; 00103 return $this; 00104 } 00105 00106 }