Ejemplo n.º 1
0
 /**
  * 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('yt') . ':' . 'statistics':
             $statistics = new Zend_Gdata_YouTube_Extension_Statistics();
             $statistics->transferFromDOM($child);
             $this->_statistics = $statistics;
             break;
         case $this->lookupNamespace('yt') . ':' . 'racy':
             $racy = new Zend_Gdata_YouTube_Extension_Racy();
             $racy->transferFromDOM($child);
             $this->_racy = $racy;
             break;
         case $this->lookupNamespace('yt') . ':' . 'recorded':
             $recorded = new Zend_Gdata_YouTube_Extension_Recorded();
             $recorded->transferFromDOM($child);
             $this->_recorded = $recorded;
             break;
         case $this->lookupNamespace('yt') . ':' . 'location':
             $location = new Zend_Gdata_YouTube_Extension_Location();
             $location->transferFromDOM($child);
             $this->_location = $location;
             break;
         case $this->lookupNamespace('gd') . ':' . 'rating':
             $rating = new Zend_Gdata_Extension_Rating();
             $rating->transferFromDOM($child);
             $this->_rating = $rating;
             break;
         case $this->lookupNamespace('gd') . ':' . 'comments':
             $comments = new Zend_Gdata_Extension_Comments();
             $comments->transferFromDOM($child);
             $this->_comments = $comments;
             break;
         case $this->lookupNamespace('yt') . ':' . 'noembed':
             $noEmbed = new Zend_Gdata_YouTube_Extension_NoEmbed();
             $noEmbed->transferFromDOM($child);
             $this->_noEmbed = $noEmbed;
             break;
         case $this->lookupNamespace('gd') . ':' . 'feedLink':
             $feedLink = new Zend_Gdata_Extension_FeedLink();
             $feedLink->transferFromDOM($child);
             $this->_feedLink[] = $feedLink;
             break;
         case $this->lookupNamespace('georss') . ':' . 'where':
             $where = new Zend_Gdata_Geo_Extension_GeoRssWhere();
             $where->transferFromDOM($child);
             $this->_where = $where;
             break;
         case $this->lookupNamespace('atom') . ':' . 'link':
             $link = new Zend_Gdata_YouTube_Extension_Link();
             $link->transferFromDOM($child);
             $this->_link[] = $link;
             break;
         case $this->lookupNamespace('app') . ':' . 'control':
             $control = new Zend_Gdata_YouTube_Extension_Control();
             $control->transferFromDOM($child);
             $this->_control = $control;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Ejemplo n.º 2
0
 /**
  * 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('yt') . ':' . 'statistics':
             $statistics = new Zend_Gdata_YouTube_Extension_Statistics();
             $statistics->transferFromDOM($child);
             $this->_statistics = $statistics;
             break;
         case $this->lookupNamespace('yt') . ':' . 'racy':
             $racy = new Zend_Gdata_YouTube_Extension_Racy();
             $racy->transferFromDOM($child);
             $this->_racy = $racy;
             break;
         case $this->lookupNamespace('gd') . ':' . 'rating':
             $rating = new Zend_Gdata_Extension_Rating();
             $rating->transferFromDOM($child);
             $this->_rating = $rating;
             break;
         case $this->lookupNamespace('gd') . ':' . 'comments':
             $comments = new Zend_Gdata_Extension_Comments();
             $comments->transferFromDOM($child);
             $this->_comments = $comments;
             break;
         case $this->lookupNamespace('yt') . ':' . 'noembed':
             $noEmbed = new Zend_Gdata_YouTube_Extension_NoEmbed();
             $noEmbed->transferFromDOM($child);
             $this->_noEmbed = $noEmbed;
             break;
         case $this->lookupNamespace('gd') . ':' . 'feedLink':
             $feedLink = new Zend_Gdata_Extension_FeedLink();
             $feedLink->transferFromDOM($child);
             $this->_feedLink[] = $feedLink;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }