Example #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') . ':' . 'aboutMe':
             $aboutMe = new Extension\AboutMe();
             $aboutMe->transferFromDOM($child);
             $this->_aboutMe = $aboutMe;
             break;
         case $this->lookupNamespace('yt') . ':' . 'age':
             $age = new Extension\Age();
             $age->transferFromDOM($child);
             $this->_age = $age;
             break;
         case $this->lookupNamespace('yt') . ':' . 'username':
             $username = new Extension\Username();
             $username->transferFromDOM($child);
             $this->_username = $username;
             break;
         case $this->lookupNamespace('yt') . ':' . 'books':
             $books = new Extension\Books();
             $books->transferFromDOM($child);
             $this->_books = $books;
             break;
         case $this->lookupNamespace('yt') . ':' . 'company':
             $company = new Extension\Company();
             $company->transferFromDOM($child);
             $this->_company = $company;
             break;
         case $this->lookupNamespace('yt') . ':' . 'hobbies':
             $hobbies = new Extension\Hobbies();
             $hobbies->transferFromDOM($child);
             $this->_hobbies = $hobbies;
             break;
         case $this->lookupNamespace('yt') . ':' . 'hometown':
             $hometown = new Extension\Hometown();
             $hometown->transferFromDOM($child);
             $this->_hometown = $hometown;
             break;
         case $this->lookupNamespace('yt') . ':' . 'location':
             $location = new Extension\Location();
             $location->transferFromDOM($child);
             $this->_location = $location;
             break;
         case $this->lookupNamespace('yt') . ':' . 'movies':
             $movies = new Extension\Movies();
             $movies->transferFromDOM($child);
             $this->_movies = $movies;
             break;
         case $this->lookupNamespace('yt') . ':' . 'music':
             $music = new Extension\Music();
             $music->transferFromDOM($child);
             $this->_music = $music;
             break;
         case $this->lookupNamespace('yt') . ':' . 'occupation':
             $occupation = new Extension\Occupation();
             $occupation->transferFromDOM($child);
             $this->_occupation = $occupation;
             break;
         case $this->lookupNamespace('yt') . ':' . 'school':
             $school = new Extension\School();
             $school->transferFromDOM($child);
             $this->_school = $school;
             break;
         case $this->lookupNamespace('yt') . ':' . 'gender':
             $gender = new Extension\Gender();
             $gender->transferFromDOM($child);
             $this->_gender = $gender;
             break;
         case $this->lookupNamespace('yt') . ':' . 'relationship':
             $relationship = new Extension\Relationship();
             $relationship->transferFromDOM($child);
             $this->_relationship = $relationship;
             break;
         case $this->lookupNamespace('yt') . ':' . 'firstName':
             $firstName = new Extension\FirstName();
             $firstName->transferFromDOM($child);
             $this->_firstName = $firstName;
             break;
         case $this->lookupNamespace('yt') . ':' . 'lastName':
             $lastName = new Extension\LastName();
             $lastName->transferFromDOM($child);
             $this->_lastName = $lastName;
             break;
         case $this->lookupNamespace('yt') . ':' . 'statistics':
             $statistics = new Extension\Statistics();
             $statistics->transferFromDOM($child);
             $this->_statistics = $statistics;
             break;
         case $this->lookupNamespace('media') . ':' . 'thumbnail':
             $thumbnail = new \ZendGData\Media\Extension\MediaThumbnail();
             $thumbnail->transferFromDOM($child);
             $this->_thumbnail = $thumbnail;
             break;
         case $this->lookupNamespace('gd') . ':' . 'feedLink':
             $feedLink = new \ZendGData\Extension\FeedLink();
             $feedLink->transferFromDOM($child);
             $this->_feedLink[] = $feedLink;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
 /**
  * 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('gd') . ':' . 'feedLink':
             $feedLink = new \ZendGData\Extension\FeedLink();
             $feedLink->transferFromDOM($child);
             $this->_feedLink[] = $feedLink;
             break;
         case $this->lookupNamespace('media') . ':' . 'thumbnail':
             $mediaThumbnail = new \ZendGData\Media\Extension\MediaThumbnail();
             $mediaThumbnail->transferFromDOM($child);
             $this->_mediaThumbnail = $mediaThumbnail;
             break;
         case $this->lookupNamespace('yt') . ':' . 'countHint':
             $countHint = new Extension\CountHint();
             $countHint->transferFromDOM($child);
             $this->_countHint = $countHint;
             break;
         case $this->lookupNamespace('yt') . ':' . 'playlistTitle':
             $playlistTitle = new Extension\PlaylistTitle();
             $playlistTitle->transferFromDOM($child);
             $this->_playlistTitle = $playlistTitle;
             break;
         case $this->lookupNamespace('yt') . ':' . 'playlistId':
             $playlistId = new Extension\PlaylistId();
             $playlistId->transferFromDOM($child);
             $this->_playlistId = $playlistId;
             break;
         case $this->lookupNamespace('yt') . ':' . 'queryString':
             $queryString = new Extension\QueryString();
             $queryString->transferFromDOM($child);
             $this->_queryString = $queryString;
             break;
         case $this->lookupNamespace('yt') . ':' . 'username':
             $username = new Extension\Username();
             $username->transferFromDOM($child);
             $this->_username = $username;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Example #3
0
 /**
  * Creates individual Entry objects of the appropriate type and
  * stores them as members of this entry 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') . ':' . 'videoid':
             $videoId = new Extension\VideoId();
             $videoId->transferFromDOM($child);
             $this->_videoId = $videoId;
             break;
         case $this->lookupNamespace('yt') . ':' . 'username':
             $username = new Extension\Username();
             $username->transferFromDOM($child);
             $this->_username = $username;
             break;
         case $this->lookupNamespace('gd') . ':' . 'rating':
             $rating = new \ZendGData\Extension\Rating();
             $rating->transferFromDOM($child);
             $this->_rating = $rating;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }