[44] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * Zend Framework
|
---|
| 5 | *
|
---|
| 6 | * LICENSE
|
---|
| 7 | *
|
---|
| 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.
|
---|
| 15 | *
|
---|
| 16 | * @category Zend
|
---|
| 17 | * @package Zend_Gdata
|
---|
| 18 | * @subpackage Gbase
|
---|
| 19 | * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
---|
| 20 | * @license http://framework.zend.com/license/new-bsd New BSD License
|
---|
| 21 | */
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * @see Zend_Gdata_Query
|
---|
| 25 | */
|
---|
| 26 | require_once('Zend/Gdata/Query.php');
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * Assists in constructing queries for Google Base
|
---|
| 30 | *
|
---|
| 31 | * @link http://code.google.com/apis/base
|
---|
| 32 | *
|
---|
| 33 | * @category Zend
|
---|
| 34 | * @package Zend_Gdata
|
---|
| 35 | * @subpackage Gbase
|
---|
| 36 | * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
---|
| 37 | * @license http://framework.zend.com/license/new-bsd New BSD License
|
---|
| 38 | */
|
---|
| 39 | class Zend_Gdata_Gbase_Query extends Zend_Gdata_Query
|
---|
| 40 | {
|
---|
| 41 |
|
---|
| 42 | /**
|
---|
| 43 | * Path to the customer items feeds on the Google Base server.
|
---|
| 44 | */
|
---|
| 45 | const GBASE_ITEM_FEED_URI = 'http://www.google.com/base/feeds/items';
|
---|
| 46 |
|
---|
| 47 | /**
|
---|
| 48 | * Path to the snippets feeds on the Google Base server.
|
---|
| 49 | */
|
---|
| 50 | const GBASE_SNIPPET_FEED_URI = 'http://www.google.com/base/feeds/snippets';
|
---|
| 51 |
|
---|
| 52 | /**
|
---|
| 53 | * The default URI for POST methods
|
---|
| 54 | *
|
---|
| 55 | * @var string
|
---|
| 56 | */
|
---|
| 57 | protected $_defaultFeedUri = self::GBASE_ITEM_FEED_URI;
|
---|
| 58 |
|
---|
| 59 | /**
|
---|
| 60 | * @param string $value
|
---|
| 61 | * @return Zend_Gdata_Gbase_Query Provides a fluent interface
|
---|
| 62 | */
|
---|
| 63 | public function setKey($value)
|
---|
| 64 | {
|
---|
| 65 | if ($value !== null) {
|
---|
| 66 | $this->_params['key'] = $value;
|
---|
| 67 | } else {
|
---|
| 68 | unset($this->_params['key']);
|
---|
| 69 | }
|
---|
| 70 | return $this;
|
---|
| 71 | }
|
---|
| 72 |
|
---|
| 73 | /**
|
---|
| 74 | * @param string $value
|
---|
| 75 | * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
|
---|
| 76 | */
|
---|
| 77 | public function setBq($value)
|
---|
| 78 | {
|
---|
| 79 | if ($value !== null) {
|
---|
| 80 | $this->_params['bq'] = $value;
|
---|
| 81 | } else {
|
---|
| 82 | unset($this->_params['bq']);
|
---|
| 83 | }
|
---|
| 84 | return $this;
|
---|
| 85 | }
|
---|
| 86 |
|
---|
| 87 | /**
|
---|
| 88 | * @param string $value
|
---|
| 89 | * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
|
---|
| 90 | */
|
---|
| 91 | public function setRefine($value)
|
---|
| 92 | {
|
---|
| 93 | if ($value !== null) {
|
---|
| 94 | $this->_params['refine'] = $value;
|
---|
| 95 | } else {
|
---|
| 96 | unset($this->_params['refine']);
|
---|
| 97 | }
|
---|
| 98 | return $this;
|
---|
| 99 | }
|
---|
| 100 |
|
---|
| 101 | /**
|
---|
| 102 | * @param string $value
|
---|
| 103 | * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
|
---|
| 104 | */
|
---|
| 105 | public function setContent($value)
|
---|
| 106 | {
|
---|
| 107 | if ($value !== null) {
|
---|
| 108 | $this->_params['content'] = $value;
|
---|
| 109 | } else {
|
---|
| 110 | unset($this->_params['content']);
|
---|
| 111 | }
|
---|
| 112 | return $this;
|
---|
| 113 | }
|
---|
| 114 |
|
---|
| 115 | /**
|
---|
| 116 | * @param string $value
|
---|
| 117 | * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
|
---|
| 118 | */
|
---|
| 119 | public function setOrderBy($value)
|
---|
| 120 | {
|
---|
| 121 | if ($value !== null) {
|
---|
| 122 | $this->_params['orderby'] = $value;
|
---|
| 123 | } else {
|
---|
| 124 | unset($this->_params['orderby']);
|
---|
| 125 | }
|
---|
| 126 | return $this;
|
---|
| 127 | }
|
---|
| 128 |
|
---|
| 129 | /**
|
---|
| 130 | * @param string $value
|
---|
| 131 | * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
|
---|
| 132 | */
|
---|
| 133 | public function setSortOrder($value)
|
---|
| 134 | {
|
---|
| 135 | if ($value !== null) {
|
---|
| 136 | $this->_params['sortorder'] = $value;
|
---|
| 137 | } else {
|
---|
| 138 | unset($this->_params['sortorder']);
|
---|
| 139 | }
|
---|
| 140 | return $this;
|
---|
| 141 | }
|
---|
| 142 |
|
---|
| 143 | /**
|
---|
| 144 | * @param string $value
|
---|
| 145 | * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
|
---|
| 146 | */
|
---|
| 147 | public function setCrowdBy($value)
|
---|
| 148 | {
|
---|
| 149 | if ($value !== null) {
|
---|
| 150 | $this->_params['crowdby'] = $value;
|
---|
| 151 | } else {
|
---|
| 152 | unset($this->_params['crowdby']);
|
---|
| 153 | }
|
---|
| 154 | return $this;
|
---|
| 155 | }
|
---|
| 156 |
|
---|
| 157 | /**
|
---|
| 158 | * @param string $value
|
---|
| 159 | * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
|
---|
| 160 | */
|
---|
| 161 | public function setAdjust($value)
|
---|
| 162 | {
|
---|
| 163 | if ($value !== null) {
|
---|
| 164 | $this->_params['adjust'] = $value;
|
---|
| 165 | } else {
|
---|
| 166 | unset($this->_params['adjust']);
|
---|
| 167 | }
|
---|
| 168 | return $this;
|
---|
| 169 | }
|
---|
| 170 |
|
---|
| 171 | /**
|
---|
| 172 | * @return string key
|
---|
| 173 | */
|
---|
| 174 | public function getKey()
|
---|
| 175 | {
|
---|
| 176 | if (array_key_exists('key', $this->_params)) {
|
---|
| 177 | return $this->_params['key'];
|
---|
| 178 | } else {
|
---|
| 179 | return null;
|
---|
| 180 | }
|
---|
| 181 | }
|
---|
| 182 |
|
---|
| 183 | /**
|
---|
| 184 | * @return string bq
|
---|
| 185 | */
|
---|
| 186 | public function getBq()
|
---|
| 187 | {
|
---|
| 188 | if (array_key_exists('bq', $this->_params)) {
|
---|
| 189 | return $this->_params['bq'];
|
---|
| 190 | } else {
|
---|
| 191 | return null;
|
---|
| 192 | }
|
---|
| 193 | }
|
---|
| 194 |
|
---|
| 195 | /**
|
---|
| 196 | * @return string refine
|
---|
| 197 | */
|
---|
| 198 | public function getRefine()
|
---|
| 199 | {
|
---|
| 200 | if (array_key_exists('refine', $this->_params)) {
|
---|
| 201 | return $this->_params['refine'];
|
---|
| 202 | } else {
|
---|
| 203 | return null;
|
---|
| 204 | }
|
---|
| 205 | }
|
---|
| 206 |
|
---|
| 207 | /**
|
---|
| 208 | * @return string content
|
---|
| 209 | */
|
---|
| 210 | public function getContent()
|
---|
| 211 | {
|
---|
| 212 | if (array_key_exists('content', $this->_params)) {
|
---|
| 213 | return $this->_params['content'];
|
---|
| 214 | } else {
|
---|
| 215 | return null;
|
---|
| 216 | }
|
---|
| 217 | }
|
---|
| 218 |
|
---|
| 219 | /**
|
---|
| 220 | * @return string orderby
|
---|
| 221 | */
|
---|
| 222 | public function getOrderBy()
|
---|
| 223 | {
|
---|
| 224 | if (array_key_exists('orderby', $this->_params)) {
|
---|
| 225 | return $this->_params['orderby'];
|
---|
| 226 | } else {
|
---|
| 227 | return null;
|
---|
| 228 | }
|
---|
| 229 | }
|
---|
| 230 |
|
---|
| 231 | /**
|
---|
| 232 | * @return string sortorder
|
---|
| 233 | */
|
---|
| 234 | public function getSortOrder()
|
---|
| 235 | {
|
---|
| 236 | if (array_key_exists('sortorder', $this->_params)) {
|
---|
| 237 | return $this->_params['sortorder'];
|
---|
| 238 | } else {
|
---|
| 239 | return null;
|
---|
| 240 | }
|
---|
| 241 | }
|
---|
| 242 |
|
---|
| 243 | /**
|
---|
| 244 | * @return string crowdby
|
---|
| 245 | */
|
---|
| 246 | public function getCrowdBy()
|
---|
| 247 | {
|
---|
| 248 | if (array_key_exists('crowdby', $this->_params)) {
|
---|
| 249 | return $this->_params['crowdby'];
|
---|
| 250 | } else {
|
---|
| 251 | return null;
|
---|
| 252 | }
|
---|
| 253 | }
|
---|
| 254 |
|
---|
| 255 | /**
|
---|
| 256 | * @return string adjust
|
---|
| 257 | */
|
---|
| 258 | public function getAdjust()
|
---|
| 259 | {
|
---|
| 260 | if (array_key_exists('adjust', $this->_params)) {
|
---|
| 261 | return $this->_params['adjust'];
|
---|
| 262 | } else {
|
---|
| 263 | return null;
|
---|
| 264 | }
|
---|
| 265 | }
|
---|
| 266 |
|
---|
| 267 | }
|
---|