diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Gdata/Gapps/OwnerQuery.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Gdata/Gapps/OwnerQuery.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,147 @@ +setGroupId($groupId); + $this->setOwnerEmail($ownerEmail); + } + + /** + * Set the group id to query for. + * + * @see getGroupId + * @param string $value + */ + public function setGroupId($value) + { + $this->_groupId = $value; + } + + /** + * Get the group id to query for. + * + * @return string + * + */ + public function getGroupId() + { + return $this->_groupId; + } + + /** + * Set the owner email to query for. + * + * @see getOwnerEmail + * @param string $value + */ + public function setOwnerEmail($value) + { + $this->_ownerEmail = $value; + } + + /** + * Get the owner email to query for. + * + * @return string + * + */ + public function getOwnerEmail() + { + return $this->_ownerEmail; + } + + /** + * Returns the query URL generated by this query instance. + * + * @return string The query URL for this instance. + */ + public function getQueryUrl() + { + $uri = Zend_Gdata_Gapps::APPS_BASE_FEED_URI; + $uri .= Zend_Gdata_Gapps::APPS_GROUP_PATH; + $uri .= '/' . $this->_domain; + if ($this->_groupId !== null) { + $uri .= '/' . $this->_groupId; + } else { + require_once 'Zend/Gdata/App/InvalidArgumentException.php'; + throw new Zend_Gdata_App_InvalidArgumentException( + 'groupId must not be null'); + } + + $uri .= '/owner'; + + if ($this->_ownerEmail !== null) { + $uri .= '/' . $this->_ownerEmail; + } + + $uri .= $this->getQueryString(); + return $uri; + } + +}