2
0

Query.php 6.1 KB

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