diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Gdata/App/FeedSourceParent.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Gdata/App/FeedSourceParent.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,267 @@ +_entry as $entry) { + $entry->setHttpClient($httpClient); + } + return $this; + } + + /** + * Set the active service instance for this feed and all enclosed entries. + * This will be used to perform network requests, such as when calling + * save() and delete(). + * + * @param Zend_Gdata_App $instance The new service instance. + * @return Zend_Gdata_App_FeedEntryParent Provides a fluent interface. + */ + public function setService($instance) + { + parent::setService($instance); + foreach ($this->_entry as $entry) { + $entry->setService($instance); + } + return $this; + } + + /** + * Make accessing some individual elements of the feed easier. + * + * Special accessors 'entry' and 'entries' are provided so that if + * you wish to iterate over an Atom feed's entries, you can do so + * using foreach ($feed->entries as $entry) or foreach + * ($feed->entry as $entry). + * + * @param string $var The property to access. + * @return mixed + */ + public function __get($var) + { + switch ($var) { + default: + return parent::__get($var); + } + } + + + public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) + { + $element = parent::getDOM($doc, $majorVersion, $minorVersion); + if ($this->_generator != null) { + $element->appendChild($this->_generator->getDOM($element->ownerDocument)); + } + if ($this->_icon != null) { + $element->appendChild($this->_icon->getDOM($element->ownerDocument)); + } + if ($this->_logo != null) { + $element->appendChild($this->_logo->getDOM($element->ownerDocument)); + } + if ($this->_subtitle != null) { + $element->appendChild($this->_subtitle->getDOM($element->ownerDocument)); + } + return $element; + } + + /** + * Creates individual Entry objects of the appropriate type and + * stores them in the $_entry array based upon DOM data. + * + * @param DOMNode $child The DOMNode to process + */ + protected function takeChildFromDOM($child) + { + $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; + switch ($absoluteNodeName) { + case $this->lookupNamespace('atom') . ':' . 'generator': + $generator = new Zend_Gdata_App_Extension_Generator(); + $generator->transferFromDOM($child); + $this->_generator = $generator; + break; + case $this->lookupNamespace('atom') . ':' . 'icon': + $icon = new Zend_Gdata_App_Extension_Icon(); + $icon->transferFromDOM($child); + $this->_icon = $icon; + break; + case $this->lookupNamespace('atom') . ':' . 'logo': + $logo = new Zend_Gdata_App_Extension_Logo(); + $logo->transferFromDOM($child); + $this->_logo = $logo; + break; + case $this->lookupNamespace('atom') . ':' . 'subtitle': + $subtitle = new Zend_Gdata_App_Extension_Subtitle(); + $subtitle->transferFromDOM($child); + $this->_subtitle = $subtitle; + break; + default: + parent::takeChildFromDOM($child); + break; + } + } + + /** + * @return Zend_Gdata_AppExtension_Generator + */ + public function getGenerator() + { + return $this->_generator; + } + + /** + * @param Zend_Gdata_App_Extension_Generator $value + * @return Zend_Gdata_App_FeedSourceParent Provides a fluent interface + */ + public function setGenerator($value) + { + $this->_generator = $value; + return $this; + } + + /** + * @return Zend_Gdata_AppExtension_Icon + */ + public function getIcon() + { + return $this->_icon; + } + + /** + * @param Zend_Gdata_App_Extension_Icon $value + * @return Zend_Gdata_App_FeedSourceParent Provides a fluent interface + */ + public function setIcon($value) + { + $this->_icon = $value; + return $this; + } + + /** + * @return Zend_Gdata_AppExtension_logo + */ + public function getlogo() + { + return $this->_logo; + } + + /** + * @param Zend_Gdata_App_Extension_logo $value + * @return Zend_Gdata_App_FeedSourceParent Provides a fluent interface + */ + public function setlogo($value) + { + $this->_logo = $value; + return $this; + } + + /** + * @return Zend_Gdata_AppExtension_Subtitle + */ + public function getSubtitle() + { + return $this->_subtitle; + } + + /** + * @param Zend_Gdata_App_Extension_Subtitle $value + * @return Zend_Gdata_App_FeedSourceParent Provides a fluent interface + */ + public function setSubtitle($value) + { + $this->_subtitle = $value; + return $this; + } + +}