|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Entry.php'; 00028 00032 require_once 'Zend/Gdata/Kind/EventEntry.php'; 00033 00037 require_once 'Zend/Gdata/Calendar/Extension/SendEventNotifications.php'; 00038 00042 require_once 'Zend/Gdata/Calendar/Extension/Timezone.php'; 00043 00047 require_once 'Zend/Gdata/Calendar/Extension/Link.php'; 00048 00052 require_once 'Zend/Gdata/Calendar/Extension/QuickAdd.php'; 00053 00063 class Zend_Gdata_Calendar_EventEntry extends Zend_Gdata_Kind_EventEntry 00064 { 00065 00066 protected $_entryClassName = 'Zend_Gdata_Calendar_EventEntry'; 00067 protected $_sendEventNotifications = null; 00068 protected $_timezone = null; 00069 protected $_quickadd = null; 00070 00071 public function __construct($element = null) 00072 { 00073 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces); 00074 parent::__construct($element); 00075 } 00076 00077 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00078 { 00079 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00080 if ($this->_sendEventNotifications != null) { 00081 $element->appendChild($this->_sendEventNotifications->getDOM($element->ownerDocument)); 00082 } 00083 if ($this->_timezone != null) { 00084 $element->appendChild($this->_timezone->getDOM($element->ownerDocument)); 00085 } 00086 if ($this->_quickadd != null) { 00087 $element->appendChild($this->_quickadd->getDOM($element->ownerDocument)); 00088 } 00089 return $element; 00090 } 00091 00092 protected function takeChildFromDOM($child) 00093 { 00094 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00095 00096 switch ($absoluteNodeName) { 00097 case $this->lookupNamespace('gCal') . ':' . 'sendEventNotifications'; 00098 $sendEventNotifications = new Zend_Gdata_Calendar_Extension_SendEventNotifications(); 00099 $sendEventNotifications->transferFromDOM($child); 00100 $this->_sendEventNotifications = $sendEventNotifications; 00101 break; 00102 case $this->lookupNamespace('gCal') . ':' . 'timezone'; 00103 $timezone = new Zend_Gdata_Calendar_Extension_Timezone(); 00104 $timezone->transferFromDOM($child); 00105 $this->_timezone = $timezone; 00106 break; 00107 case $this->lookupNamespace('atom') . ':' . 'link'; 00108 $link = new Zend_Gdata_Calendar_Extension_Link(); 00109 $link->transferFromDOM($child); 00110 $this->_link[] = $link; 00111 break; 00112 case $this->lookupNamespace('gCal') . ':' . 'quickadd'; 00113 $quickadd = new Zend_Gdata_Calendar_Extension_QuickAdd(); 00114 $quickadd->transferFromDOM($child); 00115 $this->_quickadd = $quickadd; 00116 break; 00117 default: 00118 parent::takeChildFromDOM($child); 00119 break; 00120 } 00121 } 00122 00123 public function getSendEventNotifications() 00124 { 00125 return $this->_sendEventNotifications; 00126 } 00127 00128 public function setSendEventNotifications($value) 00129 { 00130 $this->_sendEventNotifications = $value; 00131 return $this; 00132 } 00133 00134 public function getTimezone() 00135 { 00136 return $this->_timezone; 00137 } 00138 00143 public function setTimezone($value) 00144 { 00145 $this->_timezone = $value; 00146 return $this; 00147 } 00148 00149 public function getQuickAdd() 00150 { 00151 return $this->_quickadd; 00152 } 00153 00158 public function setQuickAdd($value) 00159 { 00160 $this->_quickadd = $value; 00161 return $this; 00162 } 00163 00164 }