|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once('Zend/Gdata/Gapps/Query.php'); 00028 00043 class Zend_Gdata_Photos_UserQuery extends Zend_Gdata_Query 00044 { 00045 00052 protected $_projection = 'api'; 00053 00060 protected $_type = 'feed'; 00061 00069 protected $_user = Zend_Gdata_Photos::DEFAULT_USER; 00070 00074 public function __construct() 00075 { 00076 parent::__construct(); 00077 } 00078 00086 public function setProjection($value) 00087 { 00088 $this->_projection = $value; 00089 return $this; 00090 } 00091 00098 public function getProjection() 00099 { 00100 return $this->_projection; 00101 } 00102 00110 public function setType($value) 00111 { 00112 $this->_type = $value; 00113 return $this; 00114 } 00115 00122 public function getType() 00123 { 00124 return $this->_type; 00125 } 00126 00135 public function setUser($value) 00136 { 00137 if ($value !== null) { 00138 $this->_user = $value; 00139 } else { 00140 $this->_user = Zend_Gdata_Photos::DEFAULT_USER; 00141 } 00142 } 00143 00150 public function getUser() 00151 { 00152 return $this->_user; 00153 } 00154 00165 public function setAccess($value) 00166 { 00167 if ($value !== null) { 00168 $this->_params['access'] = $value; 00169 } else { 00170 unset($this->_params['access']); 00171 } 00172 } 00173 00181 public function getAccess() 00182 { 00183 return $this->_params['access']; 00184 } 00185 00197 public function setTag($value) 00198 { 00199 if ($value !== null) { 00200 $this->_params['tag'] = $value; 00201 } else { 00202 unset($this->_params['tag']); 00203 } 00204 } 00205 00213 public function getTag() 00214 { 00215 return $this->_params['tag']; 00216 } 00217 00229 public function setKind($value) 00230 { 00231 if ($value !== null) { 00232 $this->_params['kind'] = $value; 00233 } else { 00234 unset($this->_params['kind']); 00235 } 00236 } 00237 00245 public function getKind() 00246 { 00247 return $this->_params['kind']; 00248 } 00249 00261 public function setImgMax($value) 00262 { 00263 if ($value !== null) { 00264 $this->_params['imgmax'] = $value; 00265 } else { 00266 unset($this->_params['imgmax']); 00267 } 00268 } 00269 00277 public function getImgMax() 00278 { 00279 return $this->_params['imgmax']; 00280 } 00281 00293 public function setThumbsize($value) 00294 { 00295 if ($value !== null) { 00296 $this->_params['thumbsize'] = $value; 00297 } else { 00298 unset($this->_params['thumbsize']); 00299 } 00300 } 00301 00309 public function getThumbsize() 00310 { 00311 return $this->_params['thumbsize']; 00312 } 00313 00321 public function getQueryUrl($incomingUri = null) 00322 { 00323 $uri = Zend_Gdata_Photos::PICASA_BASE_URI; 00324 00325 if ($this->getType() !== null) { 00326 $uri .= '/' . $this->getType(); 00327 } else { 00328 require_once 'Zend/Gdata/App/InvalidArgumentException.php'; 00329 throw new Zend_Gdata_App_InvalidArgumentException( 00330 'Type must be feed or entry, not null'); 00331 } 00332 00333 if ($this->getProjection() !== null) { 00334 $uri .= '/' . $this->getProjection(); 00335 } else { 00336 require_once 'Zend/Gdata/App/InvalidArgumentException.php'; 00337 throw new Zend_Gdata_App_InvalidArgumentException( 00338 'Projection must not be null'); 00339 } 00340 00341 if ($this->getUser() !== null) { 00342 $uri .= '/user/' . $this->getUser(); 00343 } else { 00344 // Should never occur due to setter behavior 00345 require_once 'Zend/Gdata/App/InvalidArgumentException.php'; 00346 throw new Zend_Gdata_App_InvalidArgumentException( 00347 'User must not be null'); 00348 } 00349 00350 $uri .= $incomingUri; 00351 $uri .= $this->getQueryString(); 00352 return $uri; 00353 } 00354 00355 }