source: trunk/www.guidonia.net/wp/wp-content/plugins/webtv/Drivers/Zend/Gdata/Calendar/EventEntry.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 4.9 KB
Line 
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 * @subpackage Calendar
19 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 */
22
23/**
24 * @see Zend_Gdata_Entry
25 */
26require_once 'Zend/Gdata/Entry.php';
27
28/**
29 * @see Zend_Gdata_Kind_EventEntry
30 */
31require_once 'Zend/Gdata/Kind/EventEntry.php';
32
33/**
34 * @see Zend_Gdata_Calendar_Extension_SendEventNotifications
35 */
36require_once 'Zend/Gdata/Calendar/Extension/SendEventNotifications.php';
37
38/**
39 * @see Zend_Gdata_Calendar_Extension_Timezone
40 */
41require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
42
43/**
44 * @see Zend_Gdata_Calendar_Extension_Link
45 */
46require_once 'Zend/Gdata/Calendar/Extension/Link.php';
47
48/**
49 * @see Zend_Gdata_Calendar_Extension_QuickAdd
50 */
51require_once 'Zend/Gdata/Calendar/Extension/QuickAdd.php';
52
53/**
54 * Data model class for a Google Calendar Event Entry
55 *
56 * @category Zend
57 * @package Zend_Gdata
58 * @subpackage Calendar
59 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
60 * @license http://framework.zend.com/license/new-bsd New BSD License
61 */
62class Zend_Gdata_Calendar_EventEntry extends Zend_Gdata_Kind_EventEntry
63{
64
65 protected $_entryClassName = 'Zend_Gdata_Calendar_EventEntry';
66 protected $_sendEventNotifications = null;
67 protected $_timezone = null;
68 protected $_quickadd = null;
69
70 public function __construct($element = null)
71 {
72 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
73 parent::__construct($element);
74 }
75
76 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
77 {
78 $element = parent::getDOM($doc, $majorVersion, $minorVersion);
79 if ($this->_sendEventNotifications != null) {
80 $element->appendChild($this->_sendEventNotifications->getDOM($element->ownerDocument));
81 }
82 if ($this->_timezone != null) {
83 $element->appendChild($this->_timezone->getDOM($element->ownerDocument));
84 }
85 if ($this->_quickadd != null) {
86 $element->appendChild($this->_quickadd->getDOM($element->ownerDocument));
87 }
88 return $element;
89 }
90
91 protected function takeChildFromDOM($child)
92 {
93 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
94
95 switch ($absoluteNodeName) {
96 case $this->lookupNamespace('gCal') . ':' . 'sendEventNotifications';
97 $sendEventNotifications = new Zend_Gdata_Calendar_Extension_SendEventNotifications();
98 $sendEventNotifications->transferFromDOM($child);
99 $this->_sendEventNotifications = $sendEventNotifications;
100 break;
101 case $this->lookupNamespace('gCal') . ':' . 'timezone';
102 $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
103 $timezone->transferFromDOM($child);
104 $this->_timezone = $timezone;
105 break;
106 case $this->lookupNamespace('atom') . ':' . 'link';
107 $link = new Zend_Gdata_Calendar_Extension_Link();
108 $link->transferFromDOM($child);
109 $this->_link[] = $link;
110 break;
111 case $this->lookupNamespace('gCal') . ':' . 'quickadd';
112 $quickadd = new Zend_Gdata_Calendar_Extension_QuickAdd();
113 $quickadd->transferFromDOM($child);
114 $this->_quickadd = $quickadd;
115 break;
116 default:
117 parent::takeChildFromDOM($child);
118 break;
119 }
120 }
121
122 public function getSendEventNotifications()
123 {
124 return $this->_sendEventNotifications;
125 }
126
127 public function setSendEventNotifications($value)
128 {
129 $this->_sendEventNotifications = $value;
130 return $this;
131 }
132
133 public function getTimezone()
134 {
135 return $this->_timezone;
136 }
137
138 /**
139 * @param Zend_Gdata_Calendar_Extension_Timezone $value
140 * @return Zend_Gdata_Extension_EventEntry Provides a fluent interface
141 */
142 public function setTimezone($value)
143 {
144 $this->_timezone = $value;
145 return $this;
146 }
147
148 public function getQuickAdd()
149 {
150 return $this->_quickadd;
151 }
152
153 /**
154 * @param Zend_Gdata_Calendar_Extension_QuickAdd $value
155 * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface
156 */
157 public function setQuickAdd($value)
158 {
159 $this->_quickadd = $value;
160 return $this;
161 }
162
163}
Note: See TracBrowser for help on using the repository browser.