~chroot64bit/zivios/gentoo-experimental

« back to all changes in this revision

Viewing changes to application/library/Zend/Gdata/Kind/EventEntry.php

  • Committer: Mustafa A. Hashmi
  • Date: 2008-12-04 13:32:21 UTC
  • Revision ID: mhashmi@zivios.org-20081204133221-0nd1trunwevijj38
Inclusion of new installation framework with ties to zend layout and dojo layout

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * Zend Framework
 
5
 *
 
6
 * LICENSE
 
7
 *
 
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.
 
15
 *
 
16
 * @category   Zend
 
17
 * @package    Zend_Gdata
 
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
 
20
 */
 
21
 
 
22
/**
 
23
 * @see Zend_Gdata_Entry
 
24
 */
 
25
require_once 'Zend/Gdata/Entry.php';
 
26
 
 
27
/**
 
28
 * @see Zend_Gdata_App_Extension
 
29
 */
 
30
require_once 'Zend/Gdata/App/Extension.php';
 
31
 
 
32
/**
 
33
 * @see Zend_Gdata_Extension_Where
 
34
 */
 
35
require_once 'Zend/Gdata/Extension/Where.php';
 
36
 
 
37
/**
 
38
 * @see Zend_Gdata_Extension_When
 
39
 */
 
40
require_once 'Zend/Gdata/Extension/When.php';
 
41
 
 
42
/**
 
43
 * @see Zend_Gdata_Extension_Who
 
44
 */
 
45
require_once 'Zend/Gdata/Extension/Who.php';
 
46
 
 
47
/**
 
48
 * @see Zend_Gdata_Extension_Recurrence
 
49
 */
 
50
require_once 'Zend/Gdata/Extension/Recurrence.php';
 
51
 
 
52
/**
 
53
 * @see Zend_Gdata_Extension_EventStatus
 
54
 */
 
55
require_once 'Zend/Gdata/Extension/EventStatus.php';
 
56
 
 
57
/**
 
58
 * @see Zend_Gdata_Extension_Comments
 
59
 */
 
60
require_once 'Zend/Gdata/Extension/Comments.php';
 
61
 
 
62
/**
 
63
 * @see Zend_Gdata_Extension_Transparency
 
64
 */
 
65
require_once 'Zend/Gdata/Extension/Transparency.php';
 
66
 
 
67
/**
 
68
 * @see Zend_Gdata_Extension_Visibility
 
69
 */
 
70
require_once 'Zend/Gdata/Extension/Visibility.php';
 
71
 
 
72
/**
 
73
 * @see Zend_Gdata_Extension_RecurrenceException
 
74
 */
 
75
require_once 'Zend/Gdata/Extension/RecurrenceException.php';
 
76
 
 
77
/**
 
78
 * @see Zend_Gdata_Extension_ExtendedProperty
 
79
 */
 
80
require_once 'Zend/Gdata/Extension/ExtendedProperty.php';
 
81
 
 
82
/**
 
83
 * @see Zend_Gdata_Extension_OriginalEvent
 
84
 */
 
85
require_once 'Zend/Gdata/Extension/OriginalEvent.php';
 
86
 
 
87
/**
 
88
 * @see Zend_Gdata_Extension_EntryLink
 
89
 */
 
90
require_once 'Zend/Gdata/Extension/EntryLink.php';
 
91
 
 
92
/**
 
93
 * Data model for the Gdata Event "Kind".  Google Calendar has a separate
 
94
 * EventEntry class which extends this.
 
95
 *
 
96
 * @category   Zend
 
97
 * @package    Zend_Gdata
 
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
 
100
 */
 
101
class Zend_Gdata_Kind_EventEntry extends Zend_Gdata_Entry
 
102
{
 
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;
 
115
 
 
116
    public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 
117
    {
 
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));
 
122
            }
 
123
        }
 
124
        if ($this->_when != null) {
 
125
            foreach ($this->_when as $when) {
 
126
                $element->appendChild($when->getDOM($element->ownerDocument));
 
127
            }
 
128
        }
 
129
        if ($this->_where != null) {
 
130
            foreach ($this->_where as $where) {
 
131
                $element->appendChild($where->getDOM($element->ownerDocument));
 
132
            }
 
133
        }
 
134
        if ($this->_recurrenceException != null) {
 
135
            foreach ($this->_recurrenceException as $recurrenceException) {
 
136
                $element->appendChild($recurrenceException->getDOM($element->ownerDocument));
 
137
            }
 
138
        }
 
139
        if ($this->_extendedProperty != null) {
 
140
            foreach ($this->_extendedProperty as $extProp) {
 
141
                $element->appendChild($extProp->getDOM($element->ownerDocument));
 
142
            }
 
143
        }
 
144
 
 
145
        if ($this->_recurrence != null) {
 
146
            $element->appendChild($this->_recurrence->getDOM($element->ownerDocument));
 
147
        }
 
148
        if ($this->_eventStatus != null) {
 
149
            $element->appendChild($this->_eventStatus->getDOM($element->ownerDocument));
 
150
        }
 
151
        if ($this->_comments != null) {
 
152
            $element->appendChild($this->_comments->getDOM($element->ownerDocument));
 
153
        }
 
154
        if ($this->_transparency != null) {
 
155
            $element->appendChild($this->_transparency->getDOM($element->ownerDocument));
 
156
        }
 
157
        if ($this->_visibility != null) {
 
158
            $element->appendChild($this->_visibility->getDOM($element->ownerDocument));
 
159
        }
 
160
        if ($this->_originalEvent != null) {
 
161
            $element->appendChild($this->_originalEvent->getDOM($element->ownerDocument));
 
162
        }
 
163
        if ($this->_entryLink != null) {
 
164
            $element->appendChild($this->_entryLink->getDOM($element->ownerDocument));
 
165
        }
 
166
 
 
167
 
 
168
        return $element;
 
169
    }
 
170
 
 
171
    protected function takeChildFromDOM($child)
 
172
    {
 
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;
 
179
            break;
 
180
        case $this->lookupNamespace('gd') . ':' . 'when';
 
181
            $when = new Zend_Gdata_Extension_When();
 
182
            $when->transferFromDOM($child);
 
183
            $this->_when[] = $when;
 
184
            break;
 
185
        case $this->lookupNamespace('gd') . ':' . 'who';
 
186
            $who = new Zend_Gdata_Extension_Who();
 
187
            $who ->transferFromDOM($child);
 
188
            $this->_who[] = $who;
 
189
            break;
 
190
        case $this->lookupNamespace('gd') . ':' . 'recurrence';
 
191
            $recurrence = new Zend_Gdata_Extension_Recurrence();
 
192
            $recurrence->transferFromDOM($child);
 
193
            $this->_recurrence = $recurrence;
 
194
            break;
 
195
        case $this->lookupNamespace('gd') . ':' . 'eventStatus';
 
196
            $eventStatus = new Zend_Gdata_Extension_EventStatus();
 
197
            $eventStatus->transferFromDOM($child);
 
198
            $this->_eventStatus = $eventStatus;
 
199
            break;
 
200
        case $this->lookupNamespace('gd') . ':' . 'comments';
 
201
            $comments = new Zend_Gdata_Extension_Comments();
 
202
            $comments->transferFromDOM($child);
 
203
            $this->_comments = $comments;
 
204
            break;
 
205
        case $this->lookupNamespace('gd') . ':' . 'transparency';
 
206
            $transparency = new Zend_Gdata_Extension_Transparency();
 
207
            $transparency ->transferFromDOM($child);
 
208
            $this->_transparency = $transparency;
 
209
            break;
 
210
        case $this->lookupNamespace('gd') . ':' . 'visibility';
 
211
            $visiblity = new Zend_Gdata_Extension_Visibility();
 
212
            $visiblity ->transferFromDOM($child);
 
213
            $this->_visibility = $visiblity;
 
214
            break;
 
215
        case $this->lookupNamespace('gd') . ':' . 'recurrenceException';
 
216
            $recurrenceException = new Zend_Gdata_Extension_RecurrenceException();
 
217
            $recurrenceException ->transferFromDOM($child);
 
218
            $this->_recurrenceException[] = $recurrenceException;
 
219
            break;
 
220
        case $this->lookupNamespace('gd') . ':' . 'originalEvent';
 
221
            $originalEvent = new Zend_Gdata_Extension_OriginalEvent();
 
222
            $originalEvent ->transferFromDOM($child);
 
223
            $this->_originalEvent = $originalEvent;
 
224
            break;
 
225
        case $this->lookupNamespace('gd') . ':' . 'extendedProperty';
 
226
            $extProp = new Zend_Gdata_Extension_ExtendedProperty();
 
227
            $extProp->transferFromDOM($child);
 
228
            $this->_extendedProperty[] = $extProp;
 
229
            break;
 
230
        case $this->lookupNamespace('gd') . ':' . 'entryLink':
 
231
            $entryLink = new Zend_Gdata_Extension_EntryLink();
 
232
            $entryLink->transferFromDOM($child);
 
233
            $this->_entryLink = $entryLink;
 
234
            break;
 
235
 
 
236
        default:
 
237
            parent::takeChildFromDOM($child);
 
238
            break;
 
239
        }
 
240
    }
 
241
 
 
242
    public function getWhen()
 
243
    {
 
244
        return $this->_when;
 
245
    }
 
246
 
 
247
    /**
 
248
     * @param array $value
 
249
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
250
     */
 
251
    public function setWhen($value)
 
252
    {
 
253
        $this->_when = $value;
 
254
        return $this;
 
255
    }
 
256
 
 
257
    public function getWhere()
 
258
    {
 
259
        return $this->_where;
 
260
    }
 
261
 
 
262
    /**
 
263
     * @param array $value
 
264
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
265
     */
 
266
    public function setWhere($value)
 
267
    {
 
268
        $this->_where = $value;
 
269
        return $this;
 
270
    }
 
271
 
 
272
    public function getWho()
 
273
    {
 
274
        return $this->_who;
 
275
    }
 
276
 
 
277
    /**
 
278
     * @param array $value
 
279
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
280
     */
 
281
    public function setWho($value)
 
282
    {
 
283
        $this->_who = $value;
 
284
        return $this;
 
285
    }
 
286
 
 
287
    public function getRecurrence()
 
288
    {
 
289
        return $this->_recurrence;
 
290
    }
 
291
 
 
292
    /**
 
293
     * @param array $value
 
294
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
295
     */
 
296
    public function setRecurrence($value)
 
297
    {
 
298
        $this->_recurrence = $value;
 
299
        return $this;
 
300
    }
 
301
 
 
302
    public function getEventStatus()
 
303
    {
 
304
        return $this->_eventStatus;
 
305
    }
 
306
 
 
307
    /**
 
308
     * @param array $value
 
309
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
310
     */
 
311
    public function setEventStatus($value)
 
312
    {
 
313
        $this->_eventStatus = $value;
 
314
        return $this;
 
315
    }
 
316
 
 
317
    public function getComments()
 
318
    {
 
319
        return $this->_comments;
 
320
    }
 
321
 
 
322
    /**
 
323
     * @param array $value
 
324
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
325
     */
 
326
    public function setComments($value)
 
327
    {
 
328
        $this->_comments = $value;
 
329
        return $this;
 
330
    }
 
331
 
 
332
    public function getTransparency()
 
333
    {
 
334
        return $this->_transparency;
 
335
    }
 
336
 
 
337
    /**
 
338
     * @param Zend_Gdata_Transparency $value
 
339
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
340
     */
 
341
    public function setTransparency($value)
 
342
    {
 
343
        $this->_transparency = $value;
 
344
        return $this;
 
345
    }
 
346
 
 
347
    public function getVisibility()
 
348
    {
 
349
        return $this->_visibility;
 
350
    }
 
351
 
 
352
    /**
 
353
     * @param Zend_Gdata_Visibility $value
 
354
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
355
     */
 
356
    public function setVisibility($value)
 
357
    {
 
358
        $this->_visibility = $value;
 
359
        return $this;
 
360
    }
 
361
 
 
362
    public function getRecurrenceExcption()
 
363
    {
 
364
        return $this->_recurrenceException;
 
365
    }
 
366
 
 
367
    /**
 
368
     * @param array $value
 
369
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
370
     */
 
371
    public function setRecurrenceException($value)
 
372
    {
 
373
        $this->_recurrenceException = $value;
 
374
        return $this;
 
375
    }
 
376
 
 
377
    public function getExtendedProperty()
 
378
    {
 
379
        return $this->_extendedProperty;
 
380
    }
 
381
 
 
382
    /**
 
383
     * @param array $value
 
384
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
385
     */
 
386
    public function setExtendedProperty($value)
 
387
    {
 
388
        $this->_extendedProperty = $value;
 
389
        return $this;
 
390
    }
 
391
 
 
392
    public function getOriginalEvent()
 
393
    {
 
394
        return $this->_originalEvent;
 
395
    }
 
396
 
 
397
    /**
 
398
     * @param Zend_Gdata_Extension_OriginalEvent $value
 
399
     * @return Zend_Gdata_Kind_EventEntry Provides a fluent interface
 
400
     */
 
401
    public function setOriginalEvent($value)
 
402
    {
 
403
        $this->_originalEvent = $value;
 
404
        return $this;
 
405
    }
 
406
 
 
407
    /**
 
408
     * Get this entry's EntryLink element.
 
409
     *
 
410
     * @return Zend_Gdata_Extension_EntryLink The requested entry.
 
411
     */
 
412
    public function getEntryLink()
 
413
    {
 
414
        return $this->_entryLink;
 
415
    }
 
416
 
 
417
    /**
 
418
     * Set the child's EntryLink element.
 
419
     *
 
420
     * @param Zend_Gdata_Extension_EntryLink $value The desired value for this attribute.
 
421
     * @return Zend_Gdata_Extension_Who The element being modified.
 
422
     */
 
423
    public function setEntryLink($value)
 
424
    {
 
425
        $this->_entryLink = $value;
 
426
        return $this;
 
427
    }
 
428
 
 
429
 
 
430
}