1 | <?php |
||
10 | class QueryParameters { |
||
11 | |||
12 | private $whereClause; |
||
13 | private $and = ''; |
||
14 | private $boundData = []; |
||
15 | private $preparedBoundData = false; |
||
16 | private $boundArrays = []; |
||
17 | private $fields = []; |
||
18 | private $table; |
||
19 | private $firstOnly = false; |
||
20 | private $eagerLoad = []; |
||
21 | private $limit; |
||
22 | private $offset; |
||
23 | private $sorts = []; |
||
24 | |||
25 | /** |
||
26 | * |
||
27 | * @param string $table The name of the table |
||
28 | */ |
||
29 | 33 | public function __construct($table = null) { |
|
30 | 33 | $this->table = $table; |
|
31 | 33 | } |
|
32 | |||
33 | 25 | public function getFields() { |
|
42 | |||
43 | public function getEagerLoad() { |
||
46 | |||
47 | 12 | public function setFields($fields) { |
|
51 | |||
52 | 33 | public function getTable() { |
|
55 | |||
56 | 12 | public function setTable($table) { |
|
60 | |||
61 | 25 | public function getLimit() { |
|
64 | |||
65 | 25 | public function getOffset() { |
|
68 | |||
69 | 33 | public function getWhereClause() { |
|
83 | |||
84 | 33 | public function getBoundData() { |
|
99 | |||
100 | 4 | public function setBoundData($key, $value) { |
|
115 | |||
116 | 25 | public function getSorts() { |
|
119 | |||
120 | 24 | public function addFilter($field, $values = null) { |
|
137 | |||
138 | 6 | public function setRawFilter($filter, $values) { |
|
142 | |||
143 | /** |
||
144 | * @param boolean $firstOnly |
||
145 | */ |
||
146 | 24 | public function setFirstOnly($firstOnly) { |
|
150 | |||
151 | 25 | public function getFirstOnly() { |
|
154 | |||
155 | public function setLimit($numItems) { |
||
158 | |||
159 | public function setOffset($offset) { |
||
162 | |||
163 | /** |
||
164 | * @param string $field |
||
165 | */ |
||
166 | public function addSort($field, $direction = 'ASC') { |
||
169 | |||
170 | } |
||
171 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.