_albumId = null; $this->_albumName = $value; return $this; } /** * Get the album name which is to be returned. * * @see setAlbumName * @return string The name of the album to retrieve. */ public function getAlbumName() { return $this->_albumName; } /** * Set the album ID to query for. When set, this album's photographs * be returned. If not set or null, the default user's feed will be * returned instead. * * NOTE: Album and AlbumId are mutually exclusive. Setting one will * automatically set the other to null. * * @param string $value The ID of the album to retrieve, or null to * clear. * @return Zend_Gdata_Photos_AlbumQuery The query object. */ public function setAlbumId($value) { $this->_albumName = null; $this->_albumId = $value; return $this; } /** * Get the album ID which is to be returned. * * @see setAlbum * @return string The ID of the album to retrieve. */ public function getAlbumId() { return $this->_albumId; } /** * Returns the URL generated for this query, based on it's current * parameters. * * @return string A URL generated based on the state of this query. * @throws Zend_Gdata_App_InvalidArgumentException */ public function getQueryUrl($incomingUri = '') { $uri = ''; if ($this->getAlbumName() !== null && $this->getAlbumId() === null) { $uri .= '/album/' . $this->getAlbumName(); } elseif ($this->getAlbumName() === null && $this->getAlbumId() !== null) { $uri .= '/albumid/' . $this->getAlbumId(); } elseif ($this->getAlbumName() !== null && $this->getAlbumId() !== null) { require_once 'Zend/Gdata/App/InvalidArgumentException.php'; throw new Zend_Gdata_App_InvalidArgumentException( 'AlbumName and AlbumId cannot both be non-null'); } else { require_once 'Zend/Gdata/App/InvalidArgumentException.php'; throw new Zend_Gdata_App_InvalidArgumentException( 'AlbumName and AlbumId cannot both be null'); } $uri .= $incomingUri; return parent::getQueryUrl($uri); } }