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
27 require_once('Zend/Gdata/Books.php');
32 require_once('Zend/Gdata/Query.php');
35 * Assists in constructing queries for Books volumes
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_Books_VolumeQuery
extends Zend_Gdata_Query
47 * Create Gdata_Books_VolumeQuery object
49 * @param string|null $url If non-null, pre-initializes the instance to
52 public function __construct($url = null)
54 parent
::__construct($url);
58 * Sets the minimum level of viewability of volumes to return in the search results
60 * @param string|null $value The minimum viewability - 'full' or 'partial'
61 * @return Zend_Gdata_Books_VolumeQuery Provides a fluent interface
63 public function setMinViewability($value = null)
67 $this->_params
['min-viewability'] = 'full';
70 $this->_params
['min-viewability'] = 'partial';
73 unset($this->_params
['min-viewability']);
80 * Minimum viewability of volumes to include in search results
82 * @return string|null min-viewability
84 public function getMinViewability()
86 if (array_key_exists('min-viewability', $this->_params
)) {
87 return $this->_params
['min-viewability'];
94 * Returns the generated full query URL
96 * @return string The URL
98 public function getQueryUrl()
100 if (isset($this->_url
)) {
103 $url = Zend_Gdata_Books
::VOLUME_FEED_URI
;
105 if ($this->getCategory() !== null) {
106 $url .= '/-/' . $this->getCategory();
108 $url = $url . $this->getQueryString();