From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- zend/library/Zend/Gdata/Gapps/OwnerQuery.php | 147 +++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 zend/library/Zend/Gdata/Gapps/OwnerQuery.php (limited to 'zend/library/Zend/Gdata/Gapps/OwnerQuery.php') diff --git a/zend/library/Zend/Gdata/Gapps/OwnerQuery.php b/zend/library/Zend/Gdata/Gapps/OwnerQuery.php new file mode 100644 index 0000000..4f424d2 --- /dev/null +++ b/zend/library/Zend/Gdata/Gapps/OwnerQuery.php @@ -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; + } + +} -- cgit v1.2.3