2
0

Query.php 6.1 KB

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