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-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
25 * @see Zend_Gdata_Entry
27 require_once 'Zend/Gdata/Entry.php';
30 * @see Zend_Gdata_Kind_EventEntry
32 require_once 'Zend/Gdata/Kind/EventEntry.php';
35 * @see Zend_Gdata_Calendar_Extension_SendEventNotifications
37 require_once 'Zend/Gdata/Calendar/Extension/SendEventNotifications.php';
40 * @see Zend_Gdata_Calendar_Extension_Timezone
42 require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
45 * @see Zend_Gdata_Calendar_Extension_Link
47 require_once 'Zend/Gdata/Calendar/Extension/Link.php';
50 * @see Zend_Gdata_Calendar_Extension_QuickAdd
52 require_once 'Zend/Gdata/Calendar/Extension/QuickAdd.php';
55 * Data model class for a Google Calendar Event Entry
59 * @subpackage Calendar
60 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
61 * @license http://framework.zend.com/license/new-bsd New BSD License
63 class Zend_Gdata_Calendar_EventEntry extends Zend_Gdata_Kind_EventEntry
66 protected $_entryClassName = 'Zend_Gdata_Calendar_EventEntry';
67 protected $_sendEventNotifications = null;
68 protected $_timezone = null;
69 protected $_quickadd = null;
71 public function __construct($element = null)
73 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
74 parent::__construct($element);
77 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
79 $element = parent::getDOM($doc, $majorVersion, $minorVersion);
80 if ($this->_sendEventNotifications != null) {
81 $element->appendChild($this->_sendEventNotifications->getDOM($element->ownerDocument));
83 if ($this->_timezone != null) {
84 $element->appendChild($this->_timezone->getDOM($element->ownerDocument));
86 if ($this->_quickadd != null) {
87 $element->appendChild($this->_quickadd->getDOM($element->ownerDocument));
92 protected function takeChildFromDOM($child)
94 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
96 switch ($absoluteNodeName) {
97 case $this->lookupNamespace('gCal') . ':' . 'sendEventNotifications';
98 $sendEventNotifications = new Zend_Gdata_Calendar_Extension_SendEventNotifications();
99 $sendEventNotifications->transferFromDOM($child);
100 $this->_sendEventNotifications = $sendEventNotifications;
102 case $this->lookupNamespace('gCal') . ':' . 'timezone';
103 $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
104 $timezone->transferFromDOM($child);
105 $this->_timezone = $timezone;
107 case $this->lookupNamespace('atom') . ':' . 'link';
108 $link = new Zend_Gdata_Calendar_Extension_Link();
109 $link->transferFromDOM($child);
110 $this->_link[] = $link;
112 case $this->lookupNamespace('gCal') . ':' . 'quickadd';
113 $quickadd = new Zend_Gdata_Calendar_Extension_QuickAdd();
114 $quickadd->transferFromDOM($child);
115 $this->_quickadd = $quickadd;
118 parent::takeChildFromDOM($child);
123 public function getSendEventNotifications()
125 return $this->_sendEventNotifications;
128 public function setSendEventNotifications($value)
130 $this->_sendEventNotifications = $value;
134 public function getTimezone()
136 return $this->_timezone;
140 * @param Zend_Gdata_Calendar_Extension_Timezone $value
141 * @return Zend_Gdata_Extension_EventEntry Provides a fluent interface
143 public function setTimezone($value)
145 $this->_timezone = $value;
149 public function getQuickAdd()
151 return $this->_quickadd;
155 * @param Zend_Gdata_Calendar_Extension_QuickAdd $value
156 * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface
158 public function setQuickAdd($value)
160 $this->_quickadd = $value;