|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/App/Entry.php'; 00028 00032 require_once 'Zend/Gdata/App/FeedEntryParent.php'; 00033 00037 require_once 'Zend/Gdata/App/Extension/Generator.php'; 00038 00042 require_once 'Zend/Gdata/App/Extension/Icon.php'; 00043 00047 require_once 'Zend/Gdata/App/Extension/Logo.php'; 00048 00052 require_once 'Zend/Gdata/App/Extension/Subtitle.php'; 00053 00063 abstract class Zend_Gdata_App_FeedSourceParent extends Zend_Gdata_App_FeedEntryParent 00064 { 00065 00071 protected $_entryClassName = 'Zend_Gdata_App_Entry'; 00072 00078 protected $_rootElement = null; 00079 00080 protected $_generator = null; 00081 protected $_icon = null; 00082 protected $_logo = null; 00083 protected $_subtitle = null; 00084 00095 public function setHttpClient(Zend_Http_Client $httpClient) 00096 { 00097 parent::setHttpClient($httpClient); 00098 foreach ($this->_entry as $entry) { 00099 $entry->setHttpClient($httpClient); 00100 } 00101 return $this; 00102 } 00103 00112 public function setService($instance) 00113 { 00114 parent::setService($instance); 00115 foreach ($this->_entry as $entry) { 00116 $entry->setService($instance); 00117 } 00118 return $this; 00119 } 00120 00132 public function __get($var) 00133 { 00134 switch ($var) { 00135 default: 00136 return parent::__get($var); 00137 } 00138 } 00139 00140 00141 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00142 { 00143 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00144 if ($this->_generator != null) { 00145 $element->appendChild($this->_generator->getDOM($element->ownerDocument)); 00146 } 00147 if ($this->_icon != null) { 00148 $element->appendChild($this->_icon->getDOM($element->ownerDocument)); 00149 } 00150 if ($this->_logo != null) { 00151 $element->appendChild($this->_logo->getDOM($element->ownerDocument)); 00152 } 00153 if ($this->_subtitle != null) { 00154 $element->appendChild($this->_subtitle->getDOM($element->ownerDocument)); 00155 } 00156 return $element; 00157 } 00158 00165 protected function takeChildFromDOM($child) 00166 { 00167 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00168 switch ($absoluteNodeName) { 00169 case $this->lookupNamespace('atom') . ':' . 'generator': 00170 $generator = new Zend_Gdata_App_Extension_Generator(); 00171 $generator->transferFromDOM($child); 00172 $this->_generator = $generator; 00173 break; 00174 case $this->lookupNamespace('atom') . ':' . 'icon': 00175 $icon = new Zend_Gdata_App_Extension_Icon(); 00176 $icon->transferFromDOM($child); 00177 $this->_icon = $icon; 00178 break; 00179 case $this->lookupNamespace('atom') . ':' . 'logo': 00180 $logo = new Zend_Gdata_App_Extension_Logo(); 00181 $logo->transferFromDOM($child); 00182 $this->_logo = $logo; 00183 break; 00184 case $this->lookupNamespace('atom') . ':' . 'subtitle': 00185 $subtitle = new Zend_Gdata_App_Extension_Subtitle(); 00186 $subtitle->transferFromDOM($child); 00187 $this->_subtitle = $subtitle; 00188 break; 00189 default: 00190 parent::takeChildFromDOM($child); 00191 break; 00192 } 00193 } 00194 00198 public function getGenerator() 00199 { 00200 return $this->_generator; 00201 } 00202 00207 public function setGenerator($value) 00208 { 00209 $this->_generator = $value; 00210 return $this; 00211 } 00212 00216 public function getIcon() 00217 { 00218 return $this->_icon; 00219 } 00220 00225 public function setIcon($value) 00226 { 00227 $this->_icon = $value; 00228 return $this; 00229 } 00230 00234 public function getlogo() 00235 { 00236 return $this->_logo; 00237 } 00238 00243 public function setlogo($value) 00244 { 00245 $this->_logo = $value; 00246 return $this; 00247 } 00248 00252 public function getSubtitle() 00253 { 00254 return $this->_subtitle; 00255 } 00256 00261 public function setSubtitle($value) 00262 { 00263 $this->_subtitle = $value; 00264 return $this; 00265 } 00266 00267 }