|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once('Zend/Gdata/Photos/UserQuery.php'); 00028 00043 class Zend_Gdata_Photos_AlbumQuery extends Zend_Gdata_Photos_UserQuery 00044 { 00045 00051 protected $_albumName = null; 00052 00058 protected $_albumId = null; 00059 00072 public function setAlbumName($value) 00073 { 00074 $this->_albumId = null; 00075 $this->_albumName = $value; 00076 00077 return $this; 00078 } 00079 00086 public function getAlbumName() 00087 { 00088 return $this->_albumName; 00089 } 00090 00103 public function setAlbumId($value) 00104 { 00105 $this->_albumName = null; 00106 $this->_albumId = $value; 00107 00108 return $this; 00109 } 00110 00117 public function getAlbumId() 00118 { 00119 return $this->_albumId; 00120 } 00121 00129 public function getQueryUrl($incomingUri = '') 00130 { 00131 $uri = ''; 00132 if ($this->getAlbumName() !== null && $this->getAlbumId() === null) { 00133 $uri .= '/album/' . $this->getAlbumName(); 00134 } elseif ($this->getAlbumName() === null && $this->getAlbumId() !== null) { 00135 $uri .= '/albumid/' . $this->getAlbumId(); 00136 } elseif ($this->getAlbumName() !== null && $this->getAlbumId() !== null) { 00137 require_once 'Zend/Gdata/App/InvalidArgumentException.php'; 00138 throw new Zend_Gdata_App_InvalidArgumentException( 00139 'AlbumName and AlbumId cannot both be non-null'); 00140 } else { 00141 require_once 'Zend/Gdata/App/InvalidArgumentException.php'; 00142 throw new Zend_Gdata_App_InvalidArgumentException( 00143 'AlbumName and AlbumId cannot both be null'); 00144 } 00145 $uri .= $incomingUri; 00146 return parent::getQueryUrl($uri); 00147 } 00148 00149 }