/** * 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('apps') . ':' . 'login': $login = new Extension\Login(); $login->transferFromDOM($child); $this->_login = $login; break; case $this->lookupNamespace('apps') . ':' . 'nickname': $nickname = new Extension\Nickname(); $nickname->transferFromDOM($child); $this->_nickname = $nickname; break; default: parent::takeChildFromDOM($child); break; } }
/** * 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('gphoto') . ':' . 'access': $access = new Extension\Access(); $access->transferFromDOM($child); $this->_gphotoAccess = $access; break; case $this->lookupNamespace('gphoto') . ':' . 'location': $location = new Extension\Location(); $location->transferFromDOM($child); $this->_gphotoLocation = $location; break; case $this->lookupNamespace('gphoto') . ':' . 'name': $name = new Extension\Name(); $name->transferFromDOM($child); $this->_gphotoName = $name; break; case $this->lookupNamespace('gphoto') . ':' . 'numphotos': $numPhotos = new Extension\NumPhotos(); $numPhotos->transferFromDOM($child); $this->_gphotoNumPhotos = $numPhotos; break; case $this->lookupNamespace('gphoto') . ':' . 'commentCount': $commentCount = new Extension\CommentCount(); $commentCount->transferFromDOM($child); $this->_gphotoCommentCount = $commentCount; break; case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled': $commentingEnabled = new Extension\CommentingEnabled(); $commentingEnabled->transferFromDOM($child); $this->_gphotoCommentingEnabled = $commentingEnabled; break; case $this->lookupNamespace('gphoto') . ':' . 'id': $id = new Extension\Id(); $id->transferFromDOM($child); $this->_gphotoId = $id; break; case $this->lookupNamespace('gphoto') . ':' . 'user': $user = new Extension\User(); $user->transferFromDOM($child); $this->_gphotoUser = $user; break; case $this->lookupNamespace('gphoto') . ':' . 'timestamp': $timestamp = new Extension\Timestamp(); $timestamp->transferFromDOM($child); $this->_gphotoTimestamp = $timestamp; break; case $this->lookupNamespace('gphoto') . ':' . 'nickname': $nickname = new Extension\Nickname(); $nickname->transferFromDOM($child); $this->_gphotoNickname = $nickname; break; case $this->lookupNamespace('georss') . ':' . 'where': $geoRssWhere = new \Zend\GData\Geo\Extension\GeoRssWhere(); $geoRssWhere->transferFromDOM($child); $this->_geoRssWhere = $geoRssWhere; break; case $this->lookupNamespace('media') . ':' . 'group': $mediaGroup = new \Zend\GData\Media\Extension\MediaGroup(); $mediaGroup->transferFromDOM($child); $this->_mediaGroup = $mediaGroup; break; default: parent::takeChildFromDOM($child); break; } }
protected function takeChildFromDOM($child) { $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; switch ($absoluteNodeName) { case $this->lookupNamespace('gphoto') . ':' . 'id': $id = new Extension\Id(); $id->transferFromDOM($child); $this->_gphotoId = $id; break; case $this->lookupNamespace('gphoto') . ':' . 'user': $user = new Extension\User(); $user->transferFromDOM($child); $this->_gphotoUser = $user; break; case $this->lookupNamespace('gphoto') . ':' . 'nickname': $nickname = new Extension\Nickname(); $nickname->transferFromDOM($child); $this->_gphotoNickname = $nickname; break; case $this->lookupNamespace('gphoto') . ':' . 'name': $name = new Extension\Name(); $name->transferFromDOM($child); $this->_gphotoName = $name; break; case $this->lookupNamespace('gphoto') . ':' . 'location': $location = new Extension\Location(); $location->transferFromDOM($child); $this->_gphotoLocation = $location; break; case $this->lookupNamespace('gphoto') . ':' . 'access': $access = new Extension\Access(); $access->transferFromDOM($child); $this->_gphotoAccess = $access; break; case $this->lookupNamespace('gphoto') . ':' . 'timestamp': $timestamp = new Extension\Timestamp(); $timestamp->transferFromDOM($child); $this->_gphotoTimestamp = $timestamp; break; case $this->lookupNamespace('gphoto') . ':' . 'numphotos': $numphotos = new Extension\NumPhotos(); $numphotos->transferFromDOM($child); $this->_gphotoNumPhotos = $numphotos; break; case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled': $commentingEnabled = new Extension\CommentingEnabled(); $commentingEnabled->transferFromDOM($child); $this->_gphotoCommentingEnabled = $commentingEnabled; break; case $this->lookupNamespace('gphoto') . ':' . 'commentCount': $commentCount = new Extension\CommentCount(); $commentCount->transferFromDOM($child); $this->_gphotoCommentCount = $commentCount; break; case $this->lookupNamespace('atom') . ':' . 'entry': $entryClassName = $this->_entryClassName; $tmpEntry = new \Zend\GData\App\Entry($child); $categories = $tmpEntry->getCategory(); foreach ($categories as $category) { if ($category->scheme == Photos::KIND_PATH && $this->_entryKindClassMapping[$category->term] != "") { $entryClassName = $this->_entryKindClassMapping[$category->term]; break; } else { throw new \Zend\GData\App\Exception('Entry is missing kind declaration.'); } } $newEntry = new $entryClassName($child); $newEntry->setHttpClient($this->getHttpClient()); $this->_entry[] = $newEntry; 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('gphoto') . ':' . 'user': $user = new Extension\User(); $user->transferFromDOM($child); $this->_gphotoUser = $user; break; case $this->lookupNamespace('gphoto') . ':' . 'nickname': $nickname = new Extension\Nickname(); $nickname->transferFromDOM($child); $this->_gphotoNickname = $nickname; break; case $this->lookupNamespace('gphoto') . ':' . 'thumbnail': $thumbnail = new Extension\Thumbnail(); $thumbnail->transferFromDOM($child); $this->_gphotoThumbnail = $thumbnail; break; case $this->lookupNamespace('atom') . ':' . 'entry': $entryClassName = $this->_entryClassName; $tmpEntry = new \Zend\GData\App\Entry($child); $categories = $tmpEntry->getCategory(); foreach ($categories as $category) { if ($category->scheme == Photos::KIND_PATH && $this->_entryKindClassMapping[$category->term] != "") { $entryClassName = $this->_entryKindClassMapping[$category->term]; break; } else { throw new \Zend\GData\App\Exception('Entry is missing kind declaration.'); } } $newEntry = new $entryClassName($child); $newEntry->setHttpClient($this->getHttpClient()); $this->_entry[] = $newEntry; break; default: parent::takeChildFromDOM($child); break; } }
/** * 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('gphoto') . ':' . 'nickname': $nickname = new Extension\Nickname(); $nickname->transferFromDOM($child); $this->_gphotoNickname = $nickname; break; case $this->lookupNamespace('gphoto') . ':' . 'thumbnail': $thumbnail = new Extension\Thumbnail(); $thumbnail->transferFromDOM($child); $this->_gphotoThumbnail = $thumbnail; break; case $this->lookupNamespace('gphoto') . ':' . 'user': $user = new Extension\User(); $user->transferFromDOM($child); $this->_gphotoUser = $user; break; case $this->lookupNamespace('gphoto') . ':' . 'quotacurrent': $quotaCurrent = new Extension\QuotaCurrent(); $quotaCurrent->transferFromDOM($child); $this->_gphotoQuotaCurrent = $quotaCurrent; break; case $this->lookupNamespace('gphoto') . ':' . 'quotalimit': $quotaLimit = new Extension\QuotaLimit(); $quotaLimit->transferFromDOM($child); $this->_gphotoQuotaLimit = $quotaLimit; break; case $this->lookupNamespace('gphoto') . ':' . 'maxPhotosPerAlbum': $maxPhotosPerAlbum = new Extension\MaxPhotosPerAlbum(); $maxPhotosPerAlbum->transferFromDOM($child); $this->_gphotoMaxPhotosPerAlbum = $maxPhotosPerAlbum; break; default: parent::takeChildFromDOM($child); break; } }