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.
17 * @package Zend_Service
19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: LinkQuery.php 16211 2009-06-21 19:23:55Z thomas $
27 * @package Zend_Service
29 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
30 * @license http://framework.zend.com/license/new-bsd New BSD License
32 class Zend_Service_Simpy_LinkQuery
35 * Query string for the query
39 protected $_query = null;
42 * Maximum number of search results to return
46 protected $_limit = null;
49 * Date on which search results must have been added
53 protected $_date = null;
56 * Date after which search results must have been added
60 protected $_afterDate = null;
63 * Date before which search results must have been added
67 protected $_beforeDate = null;
70 * Sets the query string for the query
72 * @param string $query Query string in valid Simpy syntax
73 * @see http://www.simpy.com/faq#searchSyntax
74 * @see http://www.simpy.com/faq#searchFieldsLinks
75 * @return Zend_Service_Simpy_LinkQuery Provides a fluent interface
77 public function setQueryString($query)
79 $this->_query
= $query;
85 * Returns the query string set for this query
89 public function getQueryString()
95 * Sets the maximum number of search results to return
98 * @return Zend_Service_Simpy_LinkQuery Provides a fluent interface
100 public function setLimit($limit)
102 $this->_limit
= intval($limit);
104 if ($this->_limit
== 0) {
105 $this->_limit
= null;
112 * Returns the maximum number of search results to return
116 public function getLimit()
118 return $this->_limit
;
122 * Sets the date on which search results must have been added, which will
123 * override any existing values set using setAfterDate() and setBeforeDate()
125 * @param string $date
126 * @see setAfterDate()
127 * @see setBeforeDate()
128 * @return Zend_Service_Simpy_LinkQuery Provides a fluent interface
130 public function setDate($date)
132 $this->_date
= $date;
133 $this->_afterDate
= null;
134 $this->_beforeDate
= null;
140 * Returns the date on which search results must have been added
144 public function getDate()
150 * Sets the date after which search results must have been added, which will
151 * override any existing values set using setDate()
153 * @param string $date
155 * @return Zend_Service_Simpy_LinkQuery Provides a fluent interface
157 public function setAfterDate($date)
159 $this->_afterDate
= $date;
166 * Returns the date after which search results must have been added
170 public function getAfterDate()
172 return $this->_afterDate
;
176 * Sets the date before which search results must have been added, which
177 * will override any existing values set using setDate()
179 * @param string $date
181 * @return Zend_Service_Simpy_LinkQuery Provides a fluent interface
183 public function setBeforeDate($date)
185 $this->_beforeDate
= $date;
192 * Returns the date before which search results must have been added
196 public function getBeforeDate()
198 return $this->_beforeDate
;