|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00026 require_once 'Zend/Gdata/Entry.php'; 00027 00031 require_once 'Zend/Gdata/App/Extension.php'; 00032 00036 require_once 'Zend/Gdata/Extension/Where.php'; 00037 00041 require_once 'Zend/Gdata/Extension/When.php'; 00042 00046 require_once 'Zend/Gdata/Extension/Who.php'; 00047 00051 require_once 'Zend/Gdata/Extension/Recurrence.php'; 00052 00056 require_once 'Zend/Gdata/Extension/EventStatus.php'; 00057 00061 require_once 'Zend/Gdata/Extension/Comments.php'; 00062 00066 require_once 'Zend/Gdata/Extension/Transparency.php'; 00067 00071 require_once 'Zend/Gdata/Extension/Visibility.php'; 00072 00076 require_once 'Zend/Gdata/Extension/ExtendedProperty.php'; 00077 00081 require_once 'Zend/Gdata/Extension/OriginalEvent.php'; 00082 00086 require_once 'Zend/Gdata/Extension/EntryLink.php'; 00087 00098 class Zend_Gdata_Kind_EventEntry extends Zend_Gdata_Entry 00099 { 00100 protected $_who = array(); 00101 protected $_when = array(); 00102 protected $_where = array(); 00103 protected $_recurrence = null; 00104 protected $_eventStatus = null; 00105 protected $_comments = null; 00106 protected $_transparency = null; 00107 protected $_visibility = null; 00108 protected $_recurrenceException = array(); 00109 protected $_extendedProperty = array(); 00110 protected $_originalEvent = null; 00111 protected $_entryLink = null; 00112 00113 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00114 { 00115 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00116 if ($this->_who != null) { 00117 foreach ($this->_who as $who) { 00118 $element->appendChild($who->getDOM($element->ownerDocument)); 00119 } 00120 } 00121 if ($this->_when != null) { 00122 foreach ($this->_when as $when) { 00123 $element->appendChild($when->getDOM($element->ownerDocument)); 00124 } 00125 } 00126 if ($this->_where != null) { 00127 foreach ($this->_where as $where) { 00128 $element->appendChild($where->getDOM($element->ownerDocument)); 00129 } 00130 } 00131 if ($this->_recurrenceException != null) { 00132 foreach ($this->_recurrenceException as $recurrenceException) { 00133 $element->appendChild($recurrenceException->getDOM($element->ownerDocument)); 00134 } 00135 } 00136 if ($this->_extendedProperty != null) { 00137 foreach ($this->_extendedProperty as $extProp) { 00138 $element->appendChild($extProp->getDOM($element->ownerDocument)); 00139 } 00140 } 00141 00142 if ($this->_recurrence != null) { 00143 $element->appendChild($this->_recurrence->getDOM($element->ownerDocument)); 00144 } 00145 if ($this->_eventStatus != null) { 00146 $element->appendChild($this->_eventStatus->getDOM($element->ownerDocument)); 00147 } 00148 if ($this->_comments != null) { 00149 $element->appendChild($this->_comments->getDOM($element->ownerDocument)); 00150 } 00151 if ($this->_transparency != null) { 00152 $element->appendChild($this->_transparency->getDOM($element->ownerDocument)); 00153 } 00154 if ($this->_visibility != null) { 00155 $element->appendChild($this->_visibility->getDOM($element->ownerDocument)); 00156 } 00157 if ($this->_originalEvent != null) { 00158 $element->appendChild($this->_originalEvent->getDOM($element->ownerDocument)); 00159 } 00160 if ($this->_entryLink != null) { 00161 $element->appendChild($this->_entryLink->getDOM($element->ownerDocument)); 00162 } 00163 00164 00165 return $element; 00166 } 00167 00168 protected function takeChildFromDOM($child) 00169 { 00170 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00171 switch ($absoluteNodeName) { 00172 case $this->lookupNamespace('gd') . ':' . 'where'; 00173 $where = new Zend_Gdata_Extension_Where(); 00174 $where->transferFromDOM($child); 00175 $this->_where[] = $where; 00176 break; 00177 case $this->lookupNamespace('gd') . ':' . 'when'; 00178 $when = new Zend_Gdata_Extension_When(); 00179 $when->transferFromDOM($child); 00180 $this->_when[] = $when; 00181 break; 00182 case $this->lookupNamespace('gd') . ':' . 'who'; 00183 $who = new Zend_Gdata_Extension_Who(); 00184 $who ->transferFromDOM($child); 00185 $this->_who[] = $who; 00186 break; 00187 case $this->lookupNamespace('gd') . ':' . 'recurrence'; 00188 $recurrence = new Zend_Gdata_Extension_Recurrence(); 00189 $recurrence->transferFromDOM($child); 00190 $this->_recurrence = $recurrence; 00191 break; 00192 case $this->lookupNamespace('gd') . ':' . 'eventStatus'; 00193 $eventStatus = new Zend_Gdata_Extension_EventStatus(); 00194 $eventStatus->transferFromDOM($child); 00195 $this->_eventStatus = $eventStatus; 00196 break; 00197 case $this->lookupNamespace('gd') . ':' . 'comments'; 00198 $comments = new Zend_Gdata_Extension_Comments(); 00199 $comments->transferFromDOM($child); 00200 $this->_comments = $comments; 00201 break; 00202 case $this->lookupNamespace('gd') . ':' . 'transparency'; 00203 $transparency = new Zend_Gdata_Extension_Transparency(); 00204 $transparency ->transferFromDOM($child); 00205 $this->_transparency = $transparency; 00206 break; 00207 case $this->lookupNamespace('gd') . ':' . 'visibility'; 00208 $visiblity = new Zend_Gdata_Extension_Visibility(); 00209 $visiblity ->transferFromDOM($child); 00210 $this->_visibility = $visiblity; 00211 break; 00212 case $this->lookupNamespace('gd') . ':' . 'recurrenceException'; 00213 require_once 'Zend/Gdata/Extension/RecurrenceException.php'; 00214 $recurrenceException = new Zend_Gdata_Extension_RecurrenceException(); 00215 $recurrenceException ->transferFromDOM($child); 00216 $this->_recurrenceException[] = $recurrenceException; 00217 break; 00218 case $this->lookupNamespace('gd') . ':' . 'originalEvent'; 00219 $originalEvent = new Zend_Gdata_Extension_OriginalEvent(); 00220 $originalEvent ->transferFromDOM($child); 00221 $this->_originalEvent = $originalEvent; 00222 break; 00223 case $this->lookupNamespace('gd') . ':' . 'extendedProperty'; 00224 $extProp = new Zend_Gdata_Extension_ExtendedProperty(); 00225 $extProp->transferFromDOM($child); 00226 $this->_extendedProperty[] = $extProp; 00227 break; 00228 case $this->lookupNamespace('gd') . ':' . 'entryLink': 00229 $entryLink = new Zend_Gdata_Extension_EntryLink(); 00230 $entryLink->transferFromDOM($child); 00231 $this->_entryLink = $entryLink; 00232 break; 00233 00234 default: 00235 parent::takeChildFromDOM($child); 00236 break; 00237 } 00238 } 00239 00240 public function getWhen() 00241 { 00242 return $this->_when; 00243 } 00244 00249 public function setWhen($value) 00250 { 00251 $this->_when = $value; 00252 return $this; 00253 } 00254 00255 public function getWhere() 00256 { 00257 return $this->_where; 00258 } 00259 00264 public function setWhere($value) 00265 { 00266 $this->_where = $value; 00267 return $this; 00268 } 00269 00270 public function getWho() 00271 { 00272 return $this->_who; 00273 } 00274 00279 public function setWho($value) 00280 { 00281 $this->_who = $value; 00282 return $this; 00283 } 00284 00285 public function getRecurrence() 00286 { 00287 return $this->_recurrence; 00288 } 00289 00294 public function setRecurrence($value) 00295 { 00296 $this->_recurrence = $value; 00297 return $this; 00298 } 00299 00300 public function getEventStatus() 00301 { 00302 return $this->_eventStatus; 00303 } 00304 00309 public function setEventStatus($value) 00310 { 00311 $this->_eventStatus = $value; 00312 return $this; 00313 } 00314 00315 public function getComments() 00316 { 00317 return $this->_comments; 00318 } 00319 00324 public function setComments($value) 00325 { 00326 $this->_comments = $value; 00327 return $this; 00328 } 00329 00330 public function getTransparency() 00331 { 00332 return $this->_transparency; 00333 } 00334 00339 public function setTransparency($value) 00340 { 00341 $this->_transparency = $value; 00342 return $this; 00343 } 00344 00345 public function getVisibility() 00346 { 00347 return $this->_visibility; 00348 } 00349 00354 public function setVisibility($value) 00355 { 00356 $this->_visibility = $value; 00357 return $this; 00358 } 00359 00360 public function getRecurrenceExcption() 00361 { 00362 return $this->_recurrenceException; 00363 } 00364 00369 public function setRecurrenceException($value) 00370 { 00371 $this->_recurrenceException = $value; 00372 return $this; 00373 } 00374 00375 public function getExtendedProperty() 00376 { 00377 return $this->_extendedProperty; 00378 } 00379 00384 public function setExtendedProperty($value) 00385 { 00386 $this->_extendedProperty = $value; 00387 return $this; 00388 } 00389 00390 public function getOriginalEvent() 00391 { 00392 return $this->_originalEvent; 00393 } 00394 00399 public function setOriginalEvent($value) 00400 { 00401 $this->_originalEvent = $value; 00402 return $this; 00403 } 00404 00410 public function getEntryLink() 00411 { 00412 return $this->_entryLink; 00413 } 00414 00421 public function setEntryLink($value) 00422 { 00423 $this->_entryLink = $value; 00424 return $this; 00425 } 00426 00427 00428 }