Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Extension/RecurrenceException.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00032 require_once 'Zend/Gdata/Extension/EntryLink.php';
00033 
00037 require_once 'Zend/Gdata/Extension/OriginalEvent.php';
00038 
00048 class Zend_Gdata_Extension_RecurrenceException extends Zend_Gdata_Extension
00049 {
00050 
00051     protected $_rootElement = 'recurrenceException';
00052     protected $_specialized = null;
00053     protected $_entryLink = null;
00054     protected $_originalEvent = null;
00055 
00062     public function __construct($specialized = null, $entryLink = null,
00063             $originalEvent = null)
00064     {
00065         parent::__construct();
00066         $this->_specialized = $specialized;
00067         $this->_entryLink = $entryLink;
00068         $this->_originalEvent = $originalEvent;
00069     }
00070 
00081     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00082     {
00083         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00084         if ($this->_specialized !== null) {
00085             $element->setAttribute('specialized', ($this->_specialized ? "true" : "false"));
00086         }
00087         if ($this->_entryLink !== null) {
00088             $element->appendChild($this->_entryLink->getDOM($element->ownerDocument));
00089         }
00090         if ($this->_originalEvent !== null) {
00091             $element->appendChild($this->_originalEvent->getDOM($element->ownerDocument));
00092         }
00093         return $element;
00094     }
00095 
00103     protected function takeAttributeFromDOM($attribute)
00104     {
00105         switch ($attribute->localName) {
00106         case 'specialized':
00107             if ($attribute->nodeValue == "true") {
00108                 $this->_specialized = true;
00109             }
00110             else if ($attribute->nodeValue == "false") {
00111                 $this->_specialized = false;
00112             }
00113             else {
00114                 throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
00115             }
00116             break;
00117         default:
00118             parent::takeAttributeFromDOM($attribute);
00119         }
00120     }
00121 
00128     protected function takeChildFromDOM($child)
00129     {
00130         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00131         switch ($absoluteNodeName) {
00132         case $this->lookupNamespace('gd') . ':' . 'entryLink':
00133             $entryLink = new Zend_Gdata_Extension_EntryLink();
00134             $entryLink->transferFromDOM($child);
00135             $this->_entryLink = $entryLink;
00136             break;
00137         case $this->lookupNamespace('gd') . ':' . 'originalEvent':
00138             $originalEvent = new Zend_Gdata_Extension_OriginalEvent();
00139             $originalEvent->transferFromDOM($child);
00140             $this->_originalEvent = $originalEvent;
00141             break;
00142         default:
00143             parent::takeChildFromDOM($child);
00144             break;
00145         }
00146     }
00147 
00153     public function getSpecialized()
00154     {
00155         return $this->_specialized;
00156     }
00157 
00164     public function setSpecialized($value)
00165     {
00166         $this->_specialized = $value;
00167         return $this;
00168     }
00169 
00175     public function getEntryLink()
00176     {
00177         return $this->_entryLink;
00178     }
00179 
00186     public function setEntryLink($value)
00187     {
00188         $this->_entryLink = $value;
00189         return $this;
00190     }
00191 
00197     public function getOriginalEvent()
00198     {
00199         return $this->_originalEvent;
00200     }
00201 
00208     public function setOriginalEvent($value)
00209     {
00210         $this->_originalEvent = $value;
00211         return $this;
00212     }
00213 
00214 }
00215 
 All Data Structures Namespaces Files Functions Variables Enumerations