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 * @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
24 * @see Zend_Gdata_Entry
26 require_once 'Zend/Gdata/Entry.php';
29 * @see Zend_Gdata_Kind_EventEntry
31 require_once 'Zend/Gdata/Kind/EventEntry.php';
34 * @see Zend_Gdata_Calendar_Extension_SendEventNotifications
36 require_once 'Zend/Gdata/Calendar/Extension/SendEventNotifications.php';
39 * @see Zend_Gdata_Calendar_Extension_Timezone
41 require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
44 * @see Zend_Gdata_Calendar_Extension_Link
46 require_once 'Zend/Gdata/Calendar/Extension/Link.php';
49 * @see Zend_Gdata_Calendar_Extension_QuickAdd
51 require_once 'Zend/Gdata/Calendar/Extension/QuickAdd.php';
54 * Data model class for a Google Calendar Event Entry
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
62 class Zend_Gdata_Calendar_EventEntry
extends Zend_Gdata_Kind_EventEntry
65 protected $_entryClassName = 'Zend_Gdata_Calendar_EventEntry';
66 protected $_sendEventNotifications = null;
67 protected $_timezone = null;
68 protected $_quickadd = null;
70 public function __construct($element = null)
72 $this->registerAllNamespaces(Zend_Gdata_Calendar
::$namespaces);
73 parent
::__construct($element);
76 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
78 $element = parent
::getDOM($doc, $majorVersion, $minorVersion);
79 if ($this->_sendEventNotifications
!= null) {
80 $element->appendChild($this->_sendEventNotifications
->getDOM($element->ownerDocument
));
82 if ($this->_timezone
!= null) {
83 $element->appendChild($this->_timezone
->getDOM($element->ownerDocument
));
85 if ($this->_quickadd
!= null) {
86 $element->appendChild($this->_quickadd
->getDOM($element->ownerDocument
));
91 protected function takeChildFromDOM($child)
93 $absoluteNodeName = $child->namespaceURI
. ':' . $child->localName
;
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;
101 case $this->lookupNamespace('gCal') . ':' . 'timezone';
102 $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
103 $timezone->transferFromDOM($child);
104 $this->_timezone
= $timezone;
106 case $this->lookupNamespace('atom') . ':' . 'link';
107 $link = new Zend_Gdata_Calendar_Extension_Link();
108 $link->transferFromDOM($child);
109 $this->_link
[] = $link;
111 case $this->lookupNamespace('gCal') . ':' . 'quickadd';
112 $quickadd = new Zend_Gdata_Calendar_Extension_QuickAdd();
113 $quickadd->transferFromDOM($child);
114 $this->_quickadd
= $quickadd;
117 parent
::takeChildFromDOM($child);
122 public function getSendEventNotifications()
124 return $this->_sendEventNotifications
;
127 public function setSendEventNotifications($value)
129 $this->_sendEventNotifications
= $value;
133 public function getTimezone()
135 return $this->_timezone
;
139 * @param Zend_Gdata_Calendar_Extension_Timezone $value
140 * @return Zend_Gdata_Extension_EventEntry Provides a fluent interface
142 public function setTimezone($value)
144 $this->_timezone
= $value;
148 public function getQuickAdd()
150 return $this->_quickadd
;
154 * @param Zend_Gdata_Calendar_Extension_QuickAdd $value
155 * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface
157 public function setQuickAdd($value)
159 $this->_quickadd
= $value;