8
* This source file is subject to the new BSD license that is bundled
9
* with this package in the file LICENSE.txt.
10
* It is also available through the world-wide-web at this URL:
11
* http://framework.zend.com/license/new-bsd
12
* If you did not receive a copy of the license and are unable to
13
* obtain it through the world-wide-web, please send an email
14
* to license@zend.com so we can send you a copy immediately.
18
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
19
* @license http://framework.zend.com/license/new-bsd New BSD License
23
* @see Zend_Gdata_Entry
25
require_once 'Zend/Gdata/Entry.php';
28
* @see Zend_Gdata_App_Extension
30
require_once 'Zend/Gdata/App/Extension.php';
33
* @see Zend_Gdata_Extension_Where
35
require_once 'Zend/Gdata/Extension/Where.php';
38
* @see Zend_Gdata_Extension_When
40
require_once 'Zend/Gdata/Extension/When.php';
43
* @see Zend_Gdata_Extension_Who
45
require_once 'Zend/Gdata/Extension/Who.php';
48
* @see Zend_Gdata_Extension_Recurrence
50
require_once 'Zend/Gdata/Extension/Recurrence.php';
53
* @see Zend_Gdata_Extension_EventStatus
55
require_once 'Zend/Gdata/Extension/EventStatus.php';
58
* @see Zend_Gdata_Extension_Comments
60
require_once 'Zend/Gdata/Extension/Comments.php';
63
* @see Zend_Gdata_Extension_Transparency
65
require_once 'Zend/Gdata/Extension/Transparency.php';
68
* @see Zend_Gdata_Extension_Visibility
70
require_once 'Zend/Gdata/Extension/Visibility.php';
73
* @see Zend_Gdata_Extension_RecurrenceException
75
require_once 'Zend/Gdata/Extension/RecurrenceException.php';
78
* @see Zend_Gdata_Extension_ExtendedProperty
80
require_once 'Zend/Gdata/Extension/ExtendedProperty.php';
83
* @see Zend_Gdata_Extension_OriginalEvent
85
require_once 'Zend/Gdata/Extension/OriginalEvent.php';
88
* @see Zend_Gdata_Extension_EntryLink
90
require_once 'Zend/Gdata/Extension/EntryLink.php';
93
* Data model for the Gdata Event "Kind". Google Calendar has a separate
94
* EventEntry class which extends this.
98
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
99
* @license http://framework.zend.com/license/new-bsd New BSD License
101
class Zend_Gdata_Kind_EventEntry extends Zend_Gdata_Entry
103
protected $_who = array();
104
protected $_when = array();
105
protected $_where = array();
106
protected $_recurrence = null;
107
protected $_eventStatus = null;
108
protected $_comments = null;
109
protected $_transparency = null;
110
protected $_visibility = null;
111
protected $_recurrenceException = array();
112
protected $_extendedProperty = array();
113
protected $_originalEvent = null;
114
protected $_entryLink = null;
116
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
118
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
119
if ($this->_who != null) {
120
foreach ($this->_who as $who) {
121
$element->appendChild($who->getDOM($element->ownerDocument));
124
if ($this->_when != null) {
125
foreach ($this->_when as $when) {
126
$element->appendChild($when->getDOM($element->ownerDocument));
129
if ($this->_where != null) {
130
foreach ($this->_where as $where) {
131
$element->appendChild($where->getDOM($element->ownerDocument));
134
if ($this->_recurrenceException != null) {
135
foreach ($this->_recurrenceException as $recurrenceException) {
136
$element->appendChild($recurrenceException->getDOM($element->ownerDocument));
139
if ($this->_extendedProperty != null) {
140
foreach ($this->_extendedProperty as $extProp) {
141
$element->appendChild($extProp->getDOM($element->ownerDocument));
145
if ($this->_recurrence != null) {
146
$element->appendChild($this->_recurrence->getDOM($element->ownerDocument));
148
if ($this->_eventStatus != null) {
149
$element->appendChild($this->_eventStatus->getDOM($element->ownerDocument));
151
if ($this->_comments != null) {
152
$element->appendChild($this->_comments->getDOM($element->ownerDocument));
154
if ($this->_transparency != null) {
155
$element->appendChild($this->_transparency->getDOM($element->ownerDocument));
157
if ($this->_visibility != null) {
158
$element->appendChild($this->_visibility->getDOM($element->ownerDocument));
160
if ($this->_originalEvent != null) {
161
$element->appendChild($this->_originalEvent->getDOM($element->ownerDocument));
163
if ($this->_entryLink != null) {
164
$element->appendChild($this->_entryLink->getDOM($element->ownerDocument));
171
protected function takeChildFromDOM($child)
173
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
174
switch ($absoluteNodeName) {
175
case $this->lookupNamespace('gd') . ':' . 'where';
176
$where = new Zend_Gdata_Extension_Where();
177
$where->transferFromDOM($child);
178
$this->_where[] = $where;
180
case $this->lookupNamespace('gd') . ':' . 'when';
181
$when = new Zend_Gdata_Extension_When();
182
$when->transferFromDOM($child);
183
$this->_when[] = $when;
185
case $this->lookupNamespace('gd') . ':' . 'who';
186
$who = new Zend_Gdata_Extension_Who();
187
$who ->transferFromDOM($child);
188
$this->_who[] = $who;
190
case $this->lookupNamespace('gd') . ':' . 'recurrence';
191
$recurrence = new Zend_Gdata_Extension_Recurrence();
192
$recurrence->transferFromDOM($child);
193
$this->_recurrence = $recurrence;
195
case $this->lookupNamespace('gd') . ':' . 'eventStatus';
196
$eventStatus = new Zend_Gdata_Extension_EventStatus();
197
$eventStatus->transferFromDOM($child);
198
$this->_eventStatus = $eventStatus;
200
case $this->lookupNamespace('gd') . ':' . 'comments';
201
$comments = new Zend_Gdata_Extension_Comments();
202
$comments->transferFromDOM($child);
203
$this->_comments = $comments;
205
case $this->lookupNamespace('gd') . ':' . 'transparency';
206
$transparency = new Zend_Gdata_Extension_Transparency();
207
$transparency ->transferFromDOM($child);
208
$this->_transparency = $transparency;
210
case $this->lookupNamespace('gd') . ':' . 'visibility';
211
$visiblity = new Zend_Gdata_Extension_Visibility();
212
$visiblity ->transferFromDOM($child);
213
$this->_visibility = $visiblity;
215
case $this->lookupNamespace('gd') . ':' . 'recurrenceException';
216
$recurrenceException = new Zend_Gdata_Extension_RecurrenceException();
217
$recurrenceException ->transferFromDOM($child);
218
$this->_recurrenceException[] = $recurrenceException;
220
case $this->lookupNamespace('gd') . ':' . 'originalEvent';
221
$originalEvent = new Zend_Gdata_Extension_OriginalEvent();
222
$originalEvent ->transferFromDOM($child);
223
$this->_originalEvent = $originalEvent;
225
case $this->lookupNamespace('gd') . ':' . 'extendedProperty';
226
$extProp = new Zend_Gdata_Extension_ExtendedProperty();
227
$extProp->transferFromDOM($child);
228
$this->_extendedProperty[] = $extProp;
230
case $this->lookupNamespace('gd') . ':' . 'entryLink':
231
$entryLink = new Zend_Gdata_Extension_EntryLink();
232
$entryLink->transferFromDOM($child);
233
$this->_entryLink = $entryLink;
237
parent::takeChildFromDOM($child);
242
public function getWhen()
248
* @param array $value
249
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
251
public function setWhen($value)
253
$this->_when = $value;
257
public function getWhere()
259
return $this->_where;
263
* @param array $value
264
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
266
public function setWhere($value)
268
$this->_where = $value;
272
public function getWho()
278
* @param array $value
279
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
281
public function setWho($value)
283
$this->_who = $value;
287
public function getRecurrence()
289
return $this->_recurrence;
293
* @param array $value
294
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
296
public function setRecurrence($value)
298
$this->_recurrence = $value;
302
public function getEventStatus()
304
return $this->_eventStatus;
308
* @param array $value
309
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
311
public function setEventStatus($value)
313
$this->_eventStatus = $value;
317
public function getComments()
319
return $this->_comments;
323
* @param array $value
324
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
326
public function setComments($value)
328
$this->_comments = $value;
332
public function getTransparency()
334
return $this->_transparency;
338
* @param Zend_Gdata_Transparency $value
339
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
341
public function setTransparency($value)
343
$this->_transparency = $value;
347
public function getVisibility()
349
return $this->_visibility;
353
* @param Zend_Gdata_Visibility $value
354
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
356
public function setVisibility($value)
358
$this->_visibility = $value;
362
public function getRecurrenceExcption()
364
return $this->_recurrenceException;
368
* @param array $value
369
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
371
public function setRecurrenceException($value)
373
$this->_recurrenceException = $value;
377
public function getExtendedProperty()
379
return $this->_extendedProperty;
383
* @param array $value
384
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
386
public function setExtendedProperty($value)
388
$this->_extendedProperty = $value;
392
public function getOriginalEvent()
394
return $this->_originalEvent;
398
* @param Zend_Gdata_Extension_OriginalEvent $value
399
* @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
401
public function setOriginalEvent($value)
403
$this->_originalEvent = $value;
408
* Get this entry's EntryLink element.
410
* @return Zend_Gdata_Extension_EntryLink The requested entry.
412
public function getEntryLink()
414
return $this->_entryLink;
418
* Set the child's EntryLink element.
420
* @param Zend_Gdata_Extension_EntryLink $value The desired value for this attribute.
421
* @return Zend_Gdata_Extension_Who The element being modified.
423
public function setEntryLink($value)
425
$this->_entryLink = $value;