8 * This source file is subject to the new BSD license that is bundled
9 * with this package in the file LICENSE.txt.
10 * It is also available through the world-wide-web at this URL:
11 * http://framework.zend.com/license/new-bsd
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@zend.com so we can send you a copy immediately.
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
25 * @see Zend_Gdata_Gapps_Picasa_AlbumQuery
27 require_once('Zend/Gdata/Photos/AlbumQuery.php');
30 * Assists in constructing queries for comment/tag entries.
31 * Instances of this class can be provided in many places where a URL is
34 * For information on submitting queries to a server, see the
35 * service class, Zend_Gdata_Photos.
40 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
41 * @license http://framework.zend.com/license/new-bsd New BSD License
43 class Zend_Gdata_Photos_PhotoQuery extends Zend_Gdata_Photos_AlbumQuery
47 * The ID of the photo to query for.
51 protected $_photoId = null;
54 * Set the photo ID to query for. When set, this photo's comments/tags
55 * will be returned. If not set or null, the default user's feed will be
58 * @param string $value The ID of the photo to retrieve, or null to
61 public function setPhotoId($value)
63 $this->_photoId = $value;
67 * Get the photo ID which is to be returned.
70 * @return string The ID of the photo to retrieve.
72 public function getPhotoId()
74 return $this->_photoId;
78 * Returns the URL generated for this query, based on it's current
81 * @return string A URL generated based on the state of this query.
82 * @throws Zend_Gdata_App_InvalidArgumentException
84 public function getQueryUrl($incomingUri = '')
87 if ($this->getPhotoId() !== null) {
88 $uri .= '/photoid/' . $this->getPhotoId();
90 require_once 'Zend/Gdata/App/InvalidArgumentException.php';
91 throw new Zend_Gdata_App_InvalidArgumentException(
92 'PhotoId cannot be null');
95 return parent::getQueryUrl($uri);