Adding require_once statements that were missing from Zend_Gdata.
[zend/radio.git] / library / Zend / Gdata / Calendar / EventEntry.php
blobf2fc6bedbe69b3a8b66b30619443bbffc8069a9e
1 <?php
3 /**
4 * Zend Framework
6 * LICENSE
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.
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
23 /**
24 * @see Zend_Gdata_Entry
26 require_once 'Zend/Gdata/Entry.php';
28 /**
29 * @see Zend_Gdata_Kind_EventEntry
31 require_once 'Zend/Gdata/Kind/EventEntry.php';
33 /**
34 * @see Zend_Gdata_Calendar_Extension_SendEventNotifications
36 require_once 'Zend/Gdata/Calendar/Extension/SendEventNotifications.php';
38 /**
39 * @see Zend_Gdata_Calendar_Extension_Timezone
41 require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
43 /**
44 * @see Zend_Gdata_Calendar_Extension_Link
46 require_once 'Zend/Gdata/Calendar/Extension/Link.php';
48 /**
49 * @see Zend_Gdata_Calendar_Extension_QuickAdd
51 require_once 'Zend/Gdata/Calendar/Extension/QuickAdd.php';
53 /**
54 * Data model class for a Google Calendar Event Entry
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
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));
88 return $element;
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;
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;
122 public function getSendEventNotifications()
124 return $this->_sendEventNotifications;
127 public function setSendEventNotifications($value)
129 $this->_sendEventNotifications = $value;
130 return $this;
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;
145 return $this;
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;
160 return $this;