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/Books/VolumeQuery.php | 112 ++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100755 zend/library/Zend/Gdata/Books/VolumeQuery.php (limited to 'zend/library/Zend/Gdata/Books/VolumeQuery.php') diff --git a/zend/library/Zend/Gdata/Books/VolumeQuery.php b/zend/library/Zend/Gdata/Books/VolumeQuery.php new file mode 100755 index 0000000..6d57aa4 --- /dev/null +++ b/zend/library/Zend/Gdata/Books/VolumeQuery.php @@ -0,0 +1,112 @@ +_params['min-viewability'] = 'full'; + break; + case 'partial_view': + $this->_params['min-viewability'] = 'partial'; + break; + case null: + unset($this->_params['min-viewability']); + break; + } + return $this; + } + + /** + * Minimum viewability of volumes to include in search results + * + * @return string|null min-viewability + */ + public function getMinViewability() + { + if (array_key_exists('min-viewability', $this->_params)) { + return $this->_params['min-viewability']; + } else { + return null; + } + } + + /** + * Returns the generated full query URL + * + * @return string The URL + */ + public function getQueryUrl() + { + if (isset($this->_url)) { + $url = $this->_url; + } else { + $url = Zend_Gdata_Books::VOLUME_FEED_URI; + } + if ($this->getCategory() !== null) { + $url .= '/-/' . $this->getCategory(); + } + $url = $url . $this->getQueryString(); + return $url; + } + +} -- cgit v1.2.3