Merge file:///media/external_data/workspace/web/sport-group
[sport-group.git] / library / Zend / Service / Simpy / LinkQuery.php
blob2c42ab34a0014a169cfec83f6c5c22cb38b19859
1 <?php
3 /**
4 * Zend Framework
6 * LICENSE
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.
16 * @category Zend
17 * @package Zend_Service
18 * @subpackage Simpy
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 $
25 /**
26 * @category Zend
27 * @package Zend_Service
28 * @subpackage Simpy
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
34 /**
35 * Query string for the query
37 * @var string
39 protected $_query = null;
41 /**
42 * Maximum number of search results to return
44 * @var int
46 protected $_limit = null;
48 /**
49 * Date on which search results must have been added
51 * @var string
53 protected $_date = null;
55 /**
56 * Date after which search results must have been added
58 * @var string
60 protected $_afterDate = null;
62 /**
63 * Date before which search results must have been added
65 * @var string
67 protected $_beforeDate = null;
69 /**
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;
81 return $this;
84 /**
85 * Returns the query string set for this query
87 * @return string
89 public function getQueryString()
91 return $this->_query;
94 /**
95 * Sets the maximum number of search results to return
97 * @param int $limit
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;
108 return $this;
112 * Returns the maximum number of search results to return
114 * @return int
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;
136 return $this;
140 * Returns the date on which search results must have been added
142 * @return string
144 public function getDate()
146 return $this->_date;
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
154 * @see setDate()
155 * @return Zend_Service_Simpy_LinkQuery Provides a fluent interface
157 public function setAfterDate($date)
159 $this->_afterDate = $date;
160 $this->_date = null;
162 return $this;
166 * Returns the date after which search results must have been added
168 * @return string
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
180 * @see setDate()
181 * @return Zend_Service_Simpy_LinkQuery Provides a fluent interface
183 public function setBeforeDate($date)
185 $this->_beforeDate = $date;
186 $this->_date = null;
188 return $this;
192 * Returns the date before which search results must have been added
194 * @return string
196 public function getBeforeDate()
198 return $this->_beforeDate;