|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Entry.php'; 00028 00032 require_once 'Zend/Gdata/Photos/Extension/Access.php'; 00033 00037 require_once 'Zend/Gdata/Photos/Extension/BytesUsed.php'; 00038 00042 require_once 'Zend/Gdata/Photos/Extension/Location.php'; 00043 00047 require_once 'Zend/Gdata/Photos/Extension/Name.php'; 00048 00052 require_once 'Zend/Gdata/Photos/Extension/NumPhotos.php'; 00053 00057 require_once 'Zend/Gdata/Photos/Extension/NumPhotosRemaining.php'; 00058 00062 require_once 'Zend/Gdata/Photos/Extension/CommentCount.php'; 00063 00067 require_once 'Zend/Gdata/Photos/Extension/CommentingEnabled.php'; 00068 00072 require_once 'Zend/Gdata/Photos/Extension/Id.php'; 00073 00077 require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php'; 00078 00082 require_once 'Zend/Gdata/Media/Extension/MediaGroup.php'; 00083 00087 require_once 'Zend/Gdata/App/Extension/Category.php'; 00088 00104 class Zend_Gdata_Photos_AlbumEntry extends Zend_Gdata_Entry 00105 { 00106 00107 protected $_entryClassName = 'Zend_Gdata_Photos_AlbumEntry'; 00108 00114 protected $_gphotoId = null; 00115 00121 protected $_gphotoAccess = null; 00122 00128 protected $_gphotoLocation = null; 00129 00135 protected $_gphotoUser = null; 00136 00142 protected $_gphotoNickname = null; 00143 00149 protected $_gphotoTimestamp = null; 00150 00156 protected $_gphotoName = null; 00157 00163 protected $_gphotoNumPhotos = null; 00164 00170 protected $_gphotoCommentCount = null; 00171 00177 protected $_gphotoCommentingEnabled = null; 00178 00184 protected $_mediaGroup = null; 00185 00191 protected $_geoRssWhere = null; 00192 00199 public function __construct($element = null) 00200 { 00201 $this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces); 00202 parent::__construct($element); 00203 00204 $category = new Zend_Gdata_App_Extension_Category( 00205 'http://schemas.google.com/photos/2007#album', 00206 'http://schemas.google.com/g/2005#kind'); 00207 $this->setCategory(array($category)); 00208 } 00209 00219 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00220 { 00221 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00222 if ($this->_gphotoTimestamp !== null) { 00223 $element->appendChild($this->_gphotoTimestamp->getDOM($element->ownerDocument)); 00224 } 00225 if ($this->_gphotoUser !== null) { 00226 $element->appendChild($this->_gphotoUser->getDOM($element->ownerDocument)); 00227 } 00228 if ($this->_gphotoNickname !== null) { 00229 $element->appendChild($this->_gphotoNickname->getDOM($element->ownerDocument)); 00230 } 00231 if ($this->_gphotoAccess !== null) { 00232 $element->appendChild($this->_gphotoAccess->getDOM($element->ownerDocument)); 00233 } 00234 if ($this->_gphotoLocation !== null) { 00235 $element->appendChild($this->_gphotoLocation->getDOM($element->ownerDocument)); 00236 } 00237 if ($this->_gphotoName !== null) { 00238 $element->appendChild($this->_gphotoName->getDOM($element->ownerDocument)); 00239 } 00240 if ($this->_gphotoNumPhotos !== null) { 00241 $element->appendChild($this->_gphotoNumPhotos->getDOM($element->ownerDocument)); 00242 } 00243 if ($this->_gphotoCommentCount !== null) { 00244 $element->appendChild($this->_gphotoCommentCount->getDOM($element->ownerDocument)); 00245 } 00246 if ($this->_gphotoCommentingEnabled !== null) { 00247 $element->appendChild($this->_gphotoCommentingEnabled->getDOM($element->ownerDocument)); 00248 } 00249 if ($this->_gphotoId !== null) { 00250 $element->appendChild($this->_gphotoId->getDOM($element->ownerDocument)); 00251 } 00252 if ($this->_mediaGroup !== null) { 00253 $element->appendChild($this->_mediaGroup->getDOM($element->ownerDocument)); 00254 } 00255 return $element; 00256 } 00257 00264 protected function takeChildFromDOM($child) 00265 { 00266 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00267 00268 switch ($absoluteNodeName) { 00269 case $this->lookupNamespace('gphoto') . ':' . 'access'; 00270 $access = new Zend_Gdata_Photos_Extension_Access(); 00271 $access->transferFromDOM($child); 00272 $this->_gphotoAccess = $access; 00273 break; 00274 case $this->lookupNamespace('gphoto') . ':' . 'location'; 00275 $location = new Zend_Gdata_Photos_Extension_Location(); 00276 $location->transferFromDOM($child); 00277 $this->_gphotoLocation = $location; 00278 break; 00279 case $this->lookupNamespace('gphoto') . ':' . 'name'; 00280 $name = new Zend_Gdata_Photos_Extension_Name(); 00281 $name->transferFromDOM($child); 00282 $this->_gphotoName = $name; 00283 break; 00284 case $this->lookupNamespace('gphoto') . ':' . 'numphotos'; 00285 $numPhotos = new Zend_Gdata_Photos_Extension_NumPhotos(); 00286 $numPhotos->transferFromDOM($child); 00287 $this->_gphotoNumPhotos = $numPhotos; 00288 break; 00289 case $this->lookupNamespace('gphoto') . ':' . 'commentCount'; 00290 $commentCount = new Zend_Gdata_Photos_Extension_CommentCount(); 00291 $commentCount->transferFromDOM($child); 00292 $this->_gphotoCommentCount = $commentCount; 00293 break; 00294 case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled'; 00295 $commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled(); 00296 $commentingEnabled->transferFromDOM($child); 00297 $this->_gphotoCommentingEnabled = $commentingEnabled; 00298 break; 00299 case $this->lookupNamespace('gphoto') . ':' . 'id'; 00300 $id = new Zend_Gdata_Photos_Extension_Id(); 00301 $id->transferFromDOM($child); 00302 $this->_gphotoId = $id; 00303 break; 00304 case $this->lookupNamespace('gphoto') . ':' . 'user'; 00305 $user = new Zend_Gdata_Photos_Extension_User(); 00306 $user->transferFromDOM($child); 00307 $this->_gphotoUser = $user; 00308 break; 00309 case $this->lookupNamespace('gphoto') . ':' . 'timestamp'; 00310 $timestamp = new Zend_Gdata_Photos_Extension_Timestamp(); 00311 $timestamp->transferFromDOM($child); 00312 $this->_gphotoTimestamp = $timestamp; 00313 break; 00314 case $this->lookupNamespace('gphoto') . ':' . 'nickname'; 00315 $nickname = new Zend_Gdata_Photos_Extension_Nickname(); 00316 $nickname->transferFromDOM($child); 00317 $this->_gphotoNickname = $nickname; 00318 break; 00319 case $this->lookupNamespace('georss') . ':' . 'where'; 00320 $geoRssWhere = new Zend_Gdata_Geo_Extension_GeoRssWhere(); 00321 $geoRssWhere->transferFromDOM($child); 00322 $this->_geoRssWhere = $geoRssWhere; 00323 break; 00324 case $this->lookupNamespace('media') . ':' . 'group'; 00325 $mediaGroup = new Zend_Gdata_Media_Extension_MediaGroup(); 00326 $mediaGroup->transferFromDOM($child); 00327 $this->_mediaGroup = $mediaGroup; 00328 break; 00329 default: 00330 parent::takeChildFromDOM($child); 00331 break; 00332 } 00333 } 00334 00341 public function getGphotoAccess() 00342 { 00343 return $this->_gphotoAccess; 00344 } 00345 00352 public function setGphotoAccess($value) 00353 { 00354 $this->_gphotoAccess = $value; 00355 return $this; 00356 } 00357 00364 public function getGphotoLocation() 00365 { 00366 return $this->_gphotoLocation; 00367 } 00368 00375 public function setGphotoLocation($value) 00376 { 00377 $this->_location = $value; 00378 return $this; 00379 } 00380 00387 public function getGphotoName() 00388 { 00389 return $this->_gphotoName; 00390 } 00391 00398 public function setGphotoName($value) 00399 { 00400 $this->_gphotoName = $value; 00401 return $this; 00402 } 00403 00410 public function getGphotoNumPhotos() 00411 { 00412 return $this->_gphotoNumPhotos; 00413 } 00414 00421 public function setGphotoNumPhotos($value) 00422 { 00423 $this->_gphotoNumPhotos = $value; 00424 return $this; 00425 } 00426 00433 public function getGphotoCommentCount() 00434 { 00435 return $this->_gphotoCommentCount; 00436 } 00437 00444 public function setGphotoCommentCount($value) 00445 { 00446 $this->_gphotoCommentCount = $value; 00447 return $this; 00448 } 00449 00456 public function getGphotoCommentingEnabled() 00457 { 00458 return $this->_gphotoCommentingEnabled; 00459 } 00460 00467 public function setGphotoCommentingEnabled($value) 00468 { 00469 $this->_gphotoCommentingEnabled = $value; 00470 return $this; 00471 } 00472 00479 public function getGphotoId() 00480 { 00481 return $this->_gphotoId; 00482 } 00483 00490 public function setGphotoId($value) 00491 { 00492 $this->_gphotoId = $value; 00493 return $this; 00494 } 00495 00502 public function getGeoRssWhere() 00503 { 00504 return $this->_geoRssWhere; 00505 } 00506 00513 public function setGeoRssWhere($value) 00514 { 00515 $this->_geoRssWhere = $value; 00516 return $this; 00517 } 00518 00525 public function getMediaGroup() 00526 { 00527 return $this->_mediaGroup; 00528 } 00529 00536 public function setMediaGroup($value) 00537 { 00538 $this->_mediaGroup = $value; 00539 return $this; 00540 } 00541 00548 public function getGphotoUser() 00549 { 00550 return $this->_gphotoUser; 00551 } 00552 00559 public function setGphotoUser($value) 00560 { 00561 $this->_gphotoUser = $value; 00562 return $this; 00563 } 00564 00571 public function getGphotoNickname() 00572 { 00573 return $this->_gphotoNickname; 00574 } 00575 00582 public function setGphotoNickname($value) 00583 { 00584 $this->_gphotoNickname = $value; 00585 return $this; 00586 } 00587 00594 public function getGphotoTimestamp() 00595 { 00596 return $this->_gphotoTimestamp; 00597 } 00598 00605 public function setGphotoTimestamp($value) 00606 { 00607 $this->_gphotoTimestamp = $value; 00608 return $this; 00609 } 00610 }