|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Entry.php'; 00028 00032 require_once 'Zend/Gdata/Calendar/Extension/AccessLevel.php'; 00033 00037 require_once 'Zend/Gdata/Calendar/Extension/Color.php'; 00038 00042 require_once 'Zend/Gdata/Calendar/Extension/Hidden.php'; 00043 00047 require_once 'Zend/Gdata/Calendar/Extension/Selected.php'; 00048 00052 require_once 'Zend/Gdata/Extension/EventStatus.php'; 00053 00057 require_once 'Zend/Gdata/Extension/Visibility.php'; 00058 00059 00063 require_once 'Zend/Gdata/Extension/Where.php'; 00064 00075 class Zend_Gdata_Calendar_ListEntry extends Zend_Gdata_Entry 00076 { 00077 00078 protected $_color = null; 00079 protected $_accessLevel = null; 00080 protected $_hidden = null; 00081 protected $_selected = null; 00082 protected $_timezone = null; 00083 protected $_where = array(); 00084 00085 public function __construct($element = null) 00086 { 00087 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces); 00088 parent::__construct($element); 00089 } 00090 00091 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00092 { 00093 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00094 if ($this->_accessLevel != null) { 00095 $element->appendChild($this->_accessLevel->getDOM($element->ownerDocument)); 00096 } 00097 if ($this->_color != null) { 00098 $element->appendChild($this->_color->getDOM($element->ownerDocument)); 00099 } 00100 if ($this->_hidden != null) { 00101 $element->appendChild($this->_hidden->getDOM($element->ownerDocument)); 00102 } 00103 if ($this->_selected != null) { 00104 $element->appendChild($this->_selected->getDOM($element->ownerDocument)); 00105 } 00106 if ($this->_timezone != null) { 00107 $element->appendChild($this->_timezone->getDOM($element->ownerDocument)); 00108 } 00109 if ($this->_where != null) { 00110 foreach ($this->_where as $where) { 00111 $element->appendChild($where->getDOM($element->ownerDocument)); 00112 } 00113 } 00114 return $element; 00115 } 00116 00117 protected function takeChildFromDOM($child) 00118 { 00119 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00120 switch ($absoluteNodeName) { 00121 case $this->lookupNamespace('gCal') . ':' . 'accesslevel'; 00122 $accessLevel = new Zend_Gdata_Calendar_Extension_AccessLevel(); 00123 $accessLevel->transferFromDOM($child); 00124 $this->_accessLevel = $accessLevel; 00125 break; 00126 case $this->lookupNamespace('gCal') . ':' . 'color'; 00127 $color = new Zend_Gdata_Calendar_Extension_Color(); 00128 $color->transferFromDOM($child); 00129 $this->_color = $color; 00130 break; 00131 case $this->lookupNamespace('gCal') . ':' . 'hidden'; 00132 $hidden = new Zend_Gdata_Calendar_Extension_Hidden(); 00133 $hidden->transferFromDOM($child); 00134 $this->_hidden = $hidden; 00135 break; 00136 case $this->lookupNamespace('gCal') . ':' . 'selected'; 00137 $selected = new Zend_Gdata_Calendar_Extension_Selected(); 00138 $selected->transferFromDOM($child); 00139 $this->_selected = $selected; 00140 break; 00141 case $this->lookupNamespace('gCal') . ':' . 'timezone'; 00142 $timezone = new Zend_Gdata_Calendar_Extension_Timezone(); 00143 $timezone->transferFromDOM($child); 00144 $this->_timezone = $timezone; 00145 break; 00146 case $this->lookupNamespace('gd') . ':' . 'where'; 00147 $where = new Zend_Gdata_Extension_Where(); 00148 $where->transferFromDOM($child); 00149 $this->_where[] = $where; 00150 break; 00151 default: 00152 parent::takeChildFromDOM($child); 00153 break; 00154 } 00155 } 00156 00157 public function getAccessLevel() 00158 { 00159 return $this->_accessLevel; 00160 } 00161 00166 public function setAccessLevel($value) 00167 { 00168 $this->_accessLevel = $value; 00169 return $this; 00170 } 00171 public function getColor() 00172 { 00173 return $this->_color; 00174 } 00175 00180 public function setColor($value) 00181 { 00182 $this->_color = $value; 00183 return $this; 00184 } 00185 00186 public function getHidden() 00187 { 00188 return $this->_hidden; 00189 } 00190 00195 public function setHidden($value) 00196 { 00197 $this->_hidden = $value; 00198 return $this; 00199 } 00200 00201 public function getSelected() 00202 { 00203 return $this->_selected; 00204 } 00205 00210 public function setSelected($value) 00211 { 00212 $this->_selected = $value; 00213 return $this; 00214 } 00215 00216 public function getTimezone() 00217 { 00218 return $this->_timezone; 00219 } 00220 00225 public function setTimezone($value) 00226 { 00227 $this->_timezone = $value; 00228 return $this; 00229 } 00230 00231 public function getWhere() 00232 { 00233 return $this->_where; 00234 } 00235 00240 public function setWhere($value) 00241 { 00242 $this->_where = $value; 00243 return $this; 00244 } 00245 00246 }