Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Photos/AlbumFeed.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Photos.php';
00028 
00032 require_once 'Zend/Gdata/Feed.php';
00033 
00037 require_once 'Zend/Gdata/Photos/AlbumEntry.php';
00038 
00052 class Zend_Gdata_Photos_AlbumFeed extends Zend_Gdata_Feed
00053 {
00054     protected $_entryClassName = 'Zend_Gdata_Photos_AlbumEntry';
00055     protected $_feedClassName = 'Zend_Gdata_Photos_AlbumFeed';
00056 
00062     protected $_gphotoId = null;
00063 
00069     protected $_gphotoUser = null;
00070 
00076     protected $_gphotoAccess = null;
00077 
00083     protected $_gphotoLocation = null;
00084 
00090     protected $_gphotoNickname = null;
00091 
00097     protected $_gphotoTimestamp = null;
00098 
00104     protected $_gphotoName = null;
00105 
00111     protected $_gphotoNumPhotos = null;
00112 
00118     protected $_gphotoCommentCount = null;
00119 
00125     protected $_gphotoCommentingEnabled = null;
00126 
00127     protected $_entryKindClassMapping = array(
00128         'http://schemas.google.com/photos/2007#photo' => 'Zend_Gdata_Photos_PhotoEntry',
00129         'http://schemas.google.com/photos/2007#comment' => 'Zend_Gdata_Photos_CommentEntry',
00130         'http://schemas.google.com/photos/2007#tag' => 'Zend_Gdata_Photos_TagEntry'
00131     );
00132 
00133     public function __construct($element = null)
00134     {
00135         $this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
00136         parent::__construct($element);
00137     }
00138 
00139     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00140     {
00141         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00142         if ($this->_gphotoId != null) {
00143             $element->appendChild($this->_gphotoId->getDOM($element->ownerDocument));
00144         }
00145         if ($this->_gphotoUser != null) {
00146             $element->appendChild($this->_gphotoUser->getDOM($element->ownerDocument));
00147         }
00148         if ($this->_gphotoNickname != null) {
00149             $element->appendChild($this->_gphotoNickname->getDOM($element->ownerDocument));
00150         }
00151         if ($this->_gphotoName != null) {
00152             $element->appendChild($this->_gphotoName->getDOM($element->ownerDocument));
00153         }
00154         if ($this->_gphotoLocation != null) {
00155             $element->appendChild($this->_gphotoLocation->getDOM($element->ownerDocument));
00156         }
00157         if ($this->_gphotoAccess != null) {
00158             $element->appendChild($this->_gphotoAccess->getDOM($element->ownerDocument));
00159         }
00160         if ($this->_gphotoTimestamp != null) {
00161             $element->appendChild($this->_gphotoTimestamp->getDOM($element->ownerDocument));
00162         }
00163         if ($this->_gphotoNumPhotos != null) {
00164             $element->appendChild($this->_gphotoNumPhotos->getDOM($element->ownerDocument));
00165         }
00166         if ($this->_gphotoCommentingEnabled != null) {
00167             $element->appendChild($this->_gphotoCommentingEnabled->getDOM($element->ownerDocument));
00168         }
00169         if ($this->_gphotoCommentCount != null) {
00170             $element->appendChild($this->_gphotoCommentCount->getDOM($element->ownerDocument));
00171         }
00172 
00173         return $element;
00174     }
00175 
00176     protected function takeChildFromDOM($child)
00177     {
00178         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00179 
00180         switch ($absoluteNodeName) {
00181             case $this->lookupNamespace('gphoto') . ':' . 'id';
00182                 $id = new Zend_Gdata_Photos_Extension_Id();
00183                 $id->transferFromDOM($child);
00184                 $this->_gphotoId = $id;
00185                 break;
00186             case $this->lookupNamespace('gphoto') . ':' . 'user';
00187                 $user = new Zend_Gdata_Photos_Extension_User();
00188                 $user->transferFromDOM($child);
00189                 $this->_gphotoUser = $user;
00190                 break;
00191             case $this->lookupNamespace('gphoto') . ':' . 'nickname';
00192                 $nickname = new Zend_Gdata_Photos_Extension_Nickname();
00193                 $nickname->transferFromDOM($child);
00194                 $this->_gphotoNickname = $nickname;
00195                 break;
00196             case $this->lookupNamespace('gphoto') . ':' . 'name';
00197                 $name = new Zend_Gdata_Photos_Extension_Name();
00198                 $name->transferFromDOM($child);
00199                 $this->_gphotoName = $name;
00200                 break;
00201             case $this->lookupNamespace('gphoto') . ':' . 'location';
00202                 $location = new Zend_Gdata_Photos_Extension_Location();
00203                 $location->transferFromDOM($child);
00204                 $this->_gphotoLocation = $location;
00205                 break;
00206             case $this->lookupNamespace('gphoto') . ':' . 'access';
00207                 $access = new Zend_Gdata_Photos_Extension_Access();
00208                 $access->transferFromDOM($child);
00209                 $this->_gphotoAccess = $access;
00210                 break;
00211             case $this->lookupNamespace('gphoto') . ':' . 'timestamp';
00212                 $timestamp = new Zend_Gdata_Photos_Extension_Timestamp();
00213                 $timestamp->transferFromDOM($child);
00214                 $this->_gphotoTimestamp = $timestamp;
00215                 break;
00216             case $this->lookupNamespace('gphoto') . ':' . 'numphotos';
00217                 $numphotos = new Zend_Gdata_Photos_Extension_NumPhotos();
00218                 $numphotos->transferFromDOM($child);
00219                 $this->_gphotoNumPhotos = $numphotos;
00220                 break;
00221             case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled';
00222                 $commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled();
00223                 $commentingEnabled->transferFromDOM($child);
00224                 $this->_gphotoCommentingEnabled = $commentingEnabled;
00225                 break;
00226             case $this->lookupNamespace('gphoto') . ':' . 'commentCount';
00227                 $commentCount = new Zend_Gdata_Photos_Extension_CommentCount();
00228                 $commentCount->transferFromDOM($child);
00229                 $this->_gphotoCommentCount = $commentCount;
00230                 break;
00231             case $this->lookupNamespace('atom') . ':' . 'entry':
00232                 $entryClassName = $this->_entryClassName;
00233                 $tmpEntry = new Zend_Gdata_App_Entry($child);
00234                 $categories = $tmpEntry->getCategory();
00235                 foreach ($categories as $category) {
00236                     if ($category->scheme == Zend_Gdata_Photos::KIND_PATH &&
00237                         $this->_entryKindClassMapping[$category->term] != "") {
00238                             $entryClassName = $this->_entryKindClassMapping[$category->term];
00239                             break;
00240                     } else {
00241                         require_once 'Zend/Gdata/App/Exception.php';
00242                         throw new Zend_Gdata_App_Exception('Entry is missing kind declaration.');
00243                     }
00244                 }
00245 
00246                 $newEntry = new $entryClassName($child);
00247                 $newEntry->setHttpClient($this->getHttpClient());
00248                 $this->_entry[] = $newEntry;
00249                 break;
00250             default:
00251                 parent::takeChildFromDOM($child);
00252                 break;
00253         }
00254     }
00255 
00262     public function getGphotoUser()
00263     {
00264         return $this->_gphotoUser;
00265     }
00266 
00273     public function setGphotoUser($value)
00274     {
00275         $this->_gphotoUser = $value;
00276         return $this;
00277     }
00278 
00285     public function getGphotoAccess()
00286     {
00287         return $this->_gphotoAccess;
00288     }
00289 
00296     public function setGphotoAccess($value)
00297     {
00298         $this->_gphotoAccess = $value;
00299         return $this;
00300     }
00301 
00308     public function getGphotoLocation()
00309     {
00310         return $this->_gphotoLocation;
00311     }
00312 
00319     public function setGphotoLocation($value)
00320     {
00321         $this->_gphotoLocation = $value;
00322         return $this;
00323     }
00324 
00331     public function getGphotoName()
00332     {
00333         return $this->_gphotoName;
00334     }
00335 
00342     public function setGphotoName($value)
00343     {
00344         $this->_gphotoName = $value;
00345         return $this;
00346     }
00347 
00354     public function getGphotoNumPhotos()
00355     {
00356         return $this->_gphotoNumPhotos;
00357     }
00358 
00365     public function setGphotoNumPhotos($value)
00366     {
00367         $this->_gphotoNumPhotos = $value;
00368         return $this;
00369     }
00370 
00377     public function getGphotoCommentCount()
00378     {
00379         return $this->_gphotoCommentCount;
00380     }
00381 
00388     public function setGphotoCommentCount($value)
00389     {
00390         $this->_gphotoCommentCount = $value;
00391         return $this;
00392     }
00393 
00400     public function getGphotoCommentingEnabled()
00401     {
00402         return $this->_gphotoCommentingEnabled;
00403     }
00404 
00411     public function setGphotoCommentingEnabled($value)
00412     {
00413         $this->_gphotoCommentingEnabled = $value;
00414         return $this;
00415     }
00416 
00423     public function getGphotoId()
00424     {
00425         return $this->_gphotoId;
00426     }
00427 
00434     public function setGphotoId($value)
00435     {
00436         $this->_gphotoId = $value;
00437         return $this;
00438     }
00439 
00446     public function getGeoRssWhere()
00447     {
00448         return $this->_geoRssWhere;
00449     }
00450 
00457     public function setGeoRssWhere($value)
00458     {
00459         $this->_geoRssWhere = $value;
00460         return $this;
00461     }
00462 
00469     public function getGphotoNickname()
00470     {
00471         return $this->_gphotoNickname;
00472     }
00473 
00480     public function setGphotoNickname($value)
00481     {
00482         $this->_gphotoNickname = $value;
00483         return $this;
00484     }
00485 
00492     public function getGphotoTimestamp()
00493     {
00494         return $this->_gphotoTimestamp;
00495     }
00496 
00503     public function setGphotoTimestamp($value)
00504     {
00505         $this->_gphotoTimestamp = $value;
00506         return $this;
00507     }
00508 
00509 }
 All Data Structures Namespaces Files Functions Variables Enumerations