File indexing completed on 2025-01-26 05:29:34
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Gdata 0017 * @subpackage Gdata 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * @see Zend_Gdata_Entry 0025 */ 0026 // require_once 'Zend/Gdata/Entry.php'; 0027 0028 /** 0029 * @see Zend_Gdata_App_Extension 0030 */ 0031 // require_once 'Zend/Gdata/App/Extension.php'; 0032 0033 /** 0034 * @see Zend_Gdata_Extension_Where 0035 */ 0036 // require_once 'Zend/Gdata/Extension/Where.php'; 0037 0038 /** 0039 * @see Zend_Gdata_Extension_When 0040 */ 0041 // require_once 'Zend/Gdata/Extension/When.php'; 0042 0043 /** 0044 * @see Zend_Gdata_Extension_Who 0045 */ 0046 // require_once 'Zend/Gdata/Extension/Who.php'; 0047 0048 /** 0049 * @see Zend_Gdata_Extension_Recurrence 0050 */ 0051 // require_once 'Zend/Gdata/Extension/Recurrence.php'; 0052 0053 /** 0054 * @see Zend_Gdata_Extension_EventStatus 0055 */ 0056 // require_once 'Zend/Gdata/Extension/EventStatus.php'; 0057 0058 /** 0059 * @see Zend_Gdata_Extension_Comments 0060 */ 0061 // require_once 'Zend/Gdata/Extension/Comments.php'; 0062 0063 /** 0064 * @see Zend_Gdata_Extension_Transparency 0065 */ 0066 // require_once 'Zend/Gdata/Extension/Transparency.php'; 0067 0068 /** 0069 * @see Zend_Gdata_Extension_Visibility 0070 */ 0071 // require_once 'Zend/Gdata/Extension/Visibility.php'; 0072 0073 /** 0074 * @see Zend_Gdata_Extension_ExtendedProperty 0075 */ 0076 // require_once 'Zend/Gdata/Extension/ExtendedProperty.php'; 0077 0078 /** 0079 * @see Zend_Gdata_Extension_OriginalEvent 0080 */ 0081 // require_once 'Zend/Gdata/Extension/OriginalEvent.php'; 0082 0083 /** 0084 * @see Zend_Gdata_Extension_EntryLink 0085 */ 0086 // require_once 'Zend/Gdata/Extension/EntryLink.php'; 0087 0088 /** 0089 * Data model for the Gdata Event "Kind". Google Calendar has a separate 0090 * EventEntry class which extends this. 0091 * 0092 * @category Zend 0093 * @package Zend_Gdata 0094 * @subpackage Gdata 0095 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0096 * @license http://framework.zend.com/license/new-bsd New BSD License 0097 */ 0098 class Zend_Gdata_Kind_EventEntry extends Zend_Gdata_Entry 0099 { 0100 protected $_who = array(); 0101 protected $_when = array(); 0102 protected $_where = array(); 0103 protected $_recurrence = null; 0104 protected $_eventStatus = null; 0105 protected $_comments = null; 0106 protected $_transparency = null; 0107 protected $_visibility = null; 0108 protected $_recurrenceException = array(); 0109 protected $_extendedProperty = array(); 0110 protected $_originalEvent = null; 0111 protected $_entryLink = null; 0112 0113 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 0114 { 0115 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 0116 if ($this->_who != null) { 0117 foreach ($this->_who as $who) { 0118 $element->appendChild($who->getDOM($element->ownerDocument)); 0119 } 0120 } 0121 if ($this->_when != null) { 0122 foreach ($this->_when as $when) { 0123 $element->appendChild($when->getDOM($element->ownerDocument)); 0124 } 0125 } 0126 if ($this->_where != null) { 0127 foreach ($this->_where as $where) { 0128 $element->appendChild($where->getDOM($element->ownerDocument)); 0129 } 0130 } 0131 if ($this->_recurrenceException != null) { 0132 foreach ($this->_recurrenceException as $recurrenceException) { 0133 $element->appendChild($recurrenceException->getDOM($element->ownerDocument)); 0134 } 0135 } 0136 if ($this->_extendedProperty != null) { 0137 foreach ($this->_extendedProperty as $extProp) { 0138 $element->appendChild($extProp->getDOM($element->ownerDocument)); 0139 } 0140 } 0141 0142 if ($this->_recurrence != null) { 0143 $element->appendChild($this->_recurrence->getDOM($element->ownerDocument)); 0144 } 0145 if ($this->_eventStatus != null) { 0146 $element->appendChild($this->_eventStatus->getDOM($element->ownerDocument)); 0147 } 0148 if ($this->_comments != null) { 0149 $element->appendChild($this->_comments->getDOM($element->ownerDocument)); 0150 } 0151 if ($this->_transparency != null) { 0152 $element->appendChild($this->_transparency->getDOM($element->ownerDocument)); 0153 } 0154 if ($this->_visibility != null) { 0155 $element->appendChild($this->_visibility->getDOM($element->ownerDocument)); 0156 } 0157 if ($this->_originalEvent != null) { 0158 $element->appendChild($this->_originalEvent->getDOM($element->ownerDocument)); 0159 } 0160 if ($this->_entryLink != null) { 0161 $element->appendChild($this->_entryLink->getDOM($element->ownerDocument)); 0162 } 0163 0164 0165 return $element; 0166 } 0167 0168 protected function takeChildFromDOM($child) 0169 { 0170 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 0171 switch ($absoluteNodeName) { 0172 case $this->lookupNamespace('gd') . ':' . 'where'; 0173 $where = new Zend_Gdata_Extension_Where(); 0174 $where->transferFromDOM($child); 0175 $this->_where[] = $where; 0176 break; 0177 case $this->lookupNamespace('gd') . ':' . 'when'; 0178 $when = new Zend_Gdata_Extension_When(); 0179 $when->transferFromDOM($child); 0180 $this->_when[] = $when; 0181 break; 0182 case $this->lookupNamespace('gd') . ':' . 'who'; 0183 $who = new Zend_Gdata_Extension_Who(); 0184 $who ->transferFromDOM($child); 0185 $this->_who[] = $who; 0186 break; 0187 case $this->lookupNamespace('gd') . ':' . 'recurrence'; 0188 $recurrence = new Zend_Gdata_Extension_Recurrence(); 0189 $recurrence->transferFromDOM($child); 0190 $this->_recurrence = $recurrence; 0191 break; 0192 case $this->lookupNamespace('gd') . ':' . 'eventStatus'; 0193 $eventStatus = new Zend_Gdata_Extension_EventStatus(); 0194 $eventStatus->transferFromDOM($child); 0195 $this->_eventStatus = $eventStatus; 0196 break; 0197 case $this->lookupNamespace('gd') . ':' . 'comments'; 0198 $comments = new Zend_Gdata_Extension_Comments(); 0199 $comments->transferFromDOM($child); 0200 $this->_comments = $comments; 0201 break; 0202 case $this->lookupNamespace('gd') . ':' . 'transparency'; 0203 $transparency = new Zend_Gdata_Extension_Transparency(); 0204 $transparency ->transferFromDOM($child); 0205 $this->_transparency = $transparency; 0206 break; 0207 case $this->lookupNamespace('gd') . ':' . 'visibility'; 0208 $visiblity = new Zend_Gdata_Extension_Visibility(); 0209 $visiblity ->transferFromDOM($child); 0210 $this->_visibility = $visiblity; 0211 break; 0212 case $this->lookupNamespace('gd') . ':' . 'recurrenceException'; 0213 // require_once 'Zend/Gdata/Extension/RecurrenceException.php'; 0214 $recurrenceException = new Zend_Gdata_Extension_RecurrenceException(); 0215 $recurrenceException ->transferFromDOM($child); 0216 $this->_recurrenceException[] = $recurrenceException; 0217 break; 0218 case $this->lookupNamespace('gd') . ':' . 'originalEvent'; 0219 $originalEvent = new Zend_Gdata_Extension_OriginalEvent(); 0220 $originalEvent ->transferFromDOM($child); 0221 $this->_originalEvent = $originalEvent; 0222 break; 0223 case $this->lookupNamespace('gd') . ':' . 'extendedProperty'; 0224 $extProp = new Zend_Gdata_Extension_ExtendedProperty(); 0225 $extProp->transferFromDOM($child); 0226 $this->_extendedProperty[] = $extProp; 0227 break; 0228 case $this->lookupNamespace('gd') . ':' . 'entryLink': 0229 $entryLink = new Zend_Gdata_Extension_EntryLink(); 0230 $entryLink->transferFromDOM($child); 0231 $this->_entryLink = $entryLink; 0232 break; 0233 0234 default: 0235 parent::takeChildFromDOM($child); 0236 break; 0237 } 0238 } 0239 0240 public function getWhen() 0241 { 0242 return $this->_when; 0243 } 0244 0245 /** 0246 * @param array $value 0247 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0248 */ 0249 public function setWhen($value) 0250 { 0251 $this->_when = $value; 0252 return $this; 0253 } 0254 0255 public function getWhere() 0256 { 0257 return $this->_where; 0258 } 0259 0260 /** 0261 * @param array $value 0262 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0263 */ 0264 public function setWhere($value) 0265 { 0266 $this->_where = $value; 0267 return $this; 0268 } 0269 0270 public function getWho() 0271 { 0272 return $this->_who; 0273 } 0274 0275 /** 0276 * @param array $value 0277 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0278 */ 0279 public function setWho($value) 0280 { 0281 $this->_who = $value; 0282 return $this; 0283 } 0284 0285 public function getRecurrence() 0286 { 0287 return $this->_recurrence; 0288 } 0289 0290 /** 0291 * @param array $value 0292 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0293 */ 0294 public function setRecurrence($value) 0295 { 0296 $this->_recurrence = $value; 0297 return $this; 0298 } 0299 0300 public function getEventStatus() 0301 { 0302 return $this->_eventStatus; 0303 } 0304 0305 /** 0306 * @param array $value 0307 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0308 */ 0309 public function setEventStatus($value) 0310 { 0311 $this->_eventStatus = $value; 0312 return $this; 0313 } 0314 0315 public function getComments() 0316 { 0317 return $this->_comments; 0318 } 0319 0320 /** 0321 * @param array $value 0322 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0323 */ 0324 public function setComments($value) 0325 { 0326 $this->_comments = $value; 0327 return $this; 0328 } 0329 0330 public function getTransparency() 0331 { 0332 return $this->_transparency; 0333 } 0334 0335 /** 0336 * @param Zend_Gdata_Transparency $value 0337 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0338 */ 0339 public function setTransparency($value) 0340 { 0341 $this->_transparency = $value; 0342 return $this; 0343 } 0344 0345 public function getVisibility() 0346 { 0347 return $this->_visibility; 0348 } 0349 0350 /** 0351 * @param Zend_Gdata_Visibility $value 0352 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0353 */ 0354 public function setVisibility($value) 0355 { 0356 $this->_visibility = $value; 0357 return $this; 0358 } 0359 0360 public function getRecurrenceExcption() 0361 { 0362 return $this->_recurrenceException; 0363 } 0364 0365 /** 0366 * @param array $value 0367 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0368 */ 0369 public function setRecurrenceException($value) 0370 { 0371 $this->_recurrenceException = $value; 0372 return $this; 0373 } 0374 0375 public function getExtendedProperty() 0376 { 0377 return $this->_extendedProperty; 0378 } 0379 0380 /** 0381 * @param array $value 0382 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0383 */ 0384 public function setExtendedProperty($value) 0385 { 0386 $this->_extendedProperty = $value; 0387 return $this; 0388 } 0389 0390 public function getOriginalEvent() 0391 { 0392 return $this->_originalEvent; 0393 } 0394 0395 /** 0396 * @param Zend_Gdata_Extension_OriginalEvent $value 0397 * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface 0398 */ 0399 public function setOriginalEvent($value) 0400 { 0401 $this->_originalEvent = $value; 0402 return $this; 0403 } 0404 0405 /** 0406 * Get this entry's EntryLink element. 0407 * 0408 * @return Zend_Gdata_Extension_EntryLink The requested entry. 0409 */ 0410 public function getEntryLink() 0411 { 0412 return $this->_entryLink; 0413 } 0414 0415 /** 0416 * Set the child's EntryLink element. 0417 * 0418 * @param Zend_Gdata_Extension_EntryLink $value The desired value for this attribute. 0419 * @return Zend_Gdata_Extension_Who The element being modified. 0420 */ 0421 public function setEntryLink($value) 0422 { 0423 $this->_entryLink = $value; 0424 return $this; 0425 } 0426 0427 0428 }