File indexing completed on 2024-05-26 06:03:02

0001 <?php
0002 
0003 /**
0004  * Zend Framework
0005  *
0006  * LICENSE
0007  *
0008  * This source file is subject to the new BSD license that is bundled
0009  * with this package in the file LICENSE.txt.
0010  * It is also available through the world-wide-web at this URL:
0011  * http://framework.zend.com/license/new-bsd
0012  * If you did not receive a copy of the license and are unable to
0013  * obtain it through the world-wide-web, please send an email
0014  * to license@zend.com so we can send you a copy immediately.
0015  *
0016  * @category   Zend
0017  * @package    Zend_Gdata
0018  * @subpackage Calendar
0019  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0020  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0021  * @version    $Id$
0022  */
0023 
0024 /**
0025  * @see Zend_Gdata_Entry
0026  */
0027 // require_once 'Zend/Gdata/Entry.php';
0028 
0029 /**
0030  * @see Zend_Gdata_Kind_EventEntry
0031  */
0032 // require_once 'Zend/Gdata/Kind/EventEntry.php';
0033 
0034 /**
0035  * @see Zend_Gdata_Calendar_Extension_SendEventNotifications
0036  */
0037 // require_once 'Zend/Gdata/Calendar/Extension/SendEventNotifications.php';
0038 
0039 /**
0040  * @see Zend_Gdata_Calendar_Extension_Timezone
0041  */
0042 // require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
0043 
0044 /**
0045  * @see Zend_Gdata_Calendar_Extension_Link
0046  */
0047 // require_once 'Zend/Gdata/Calendar/Extension/Link.php';
0048 
0049 /**
0050  * @see Zend_Gdata_Calendar_Extension_QuickAdd
0051  */
0052 // require_once 'Zend/Gdata/Calendar/Extension/QuickAdd.php';
0053 
0054 /**
0055  * Data model class for a Google Calendar Event Entry
0056  *
0057  * @category   Zend
0058  * @package    Zend_Gdata
0059  * @subpackage Calendar
0060  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0061  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0062  */
0063 class Zend_Gdata_Calendar_EventEntry extends Zend_Gdata_Kind_EventEntry
0064 {
0065 
0066     protected $_entryClassName = 'Zend_Gdata_Calendar_EventEntry';
0067     protected $_sendEventNotifications = null;
0068     protected $_timezone = null;
0069     protected $_quickadd = null;
0070 
0071     public function __construct($element = null)
0072     {
0073         $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
0074         parent::__construct($element);
0075     }
0076 
0077     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
0078     {
0079         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
0080         if ($this->_sendEventNotifications != null) {
0081             $element->appendChild($this->_sendEventNotifications->getDOM($element->ownerDocument));
0082         }
0083         if ($this->_timezone != null) {
0084             $element->appendChild($this->_timezone->getDOM($element->ownerDocument));
0085         }
0086         if ($this->_quickadd != null) {
0087             $element->appendChild($this->_quickadd->getDOM($element->ownerDocument));
0088         }
0089         return $element;
0090     }
0091 
0092     protected function takeChildFromDOM($child)
0093     {
0094         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
0095 
0096         switch ($absoluteNodeName) {
0097             case $this->lookupNamespace('gCal') . ':' . 'sendEventNotifications';
0098                 $sendEventNotifications = new Zend_Gdata_Calendar_Extension_SendEventNotifications();
0099                 $sendEventNotifications->transferFromDOM($child);
0100                 $this->_sendEventNotifications = $sendEventNotifications;
0101                 break;
0102             case $this->lookupNamespace('gCal') . ':' . 'timezone';
0103                 $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
0104                 $timezone->transferFromDOM($child);
0105                 $this->_timezone = $timezone;
0106                 break;
0107             case $this->lookupNamespace('atom') . ':' . 'link';
0108                 $link = new Zend_Gdata_Calendar_Extension_Link();
0109                 $link->transferFromDOM($child);
0110                 $this->_link[] = $link;
0111                 break;
0112             case $this->lookupNamespace('gCal') . ':' . 'quickadd';
0113                 $quickadd = new Zend_Gdata_Calendar_Extension_QuickAdd();
0114                 $quickadd->transferFromDOM($child);
0115                 $this->_quickadd = $quickadd;
0116                 break;
0117             default:
0118                 parent::takeChildFromDOM($child);
0119                 break;
0120         }
0121     }
0122 
0123     public function getSendEventNotifications()
0124     {
0125         return $this->_sendEventNotifications;
0126     }
0127 
0128     public function setSendEventNotifications($value)
0129     {
0130         $this->_sendEventNotifications = $value;
0131         return $this;
0132     }
0133 
0134     public function getTimezone()
0135     {
0136         return $this->_timezone;
0137     }
0138 
0139     /**
0140      * @param Zend_Gdata_Calendar_Extension_Timezone $value
0141      * @return Zend_Gdata_Extension_EventEntry Provides a fluent interface
0142      */
0143     public function setTimezone($value)
0144     {
0145         $this->_timezone = $value;
0146         return $this;
0147     }
0148 
0149     public function getQuickAdd()
0150     {
0151         return $this->_quickadd;
0152     }
0153 
0154     /**
0155      * @param Zend_Gdata_Calendar_Extension_QuickAdd $value
0156      * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface
0157      */
0158     public function setQuickAdd($value)
0159     {
0160         $this->_quickadd = $value;
0161         return $this;
0162     }
0163 
0164 }