1 | <?php |
||
22 | */ |
||
23 | class Base implements QueryInterface |
||
24 | { |
||
25 | protected $numberDataSets = 1; |
||
26 | protected $currentDataSet = 0; |
||
27 | protected $modifiers = []; |
||
28 | protected $queryBase; |
||
29 | |||
30 | /** |
||
31 | * Stringify the current data set |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public function __toString() |
||
39 | |||
40 | /** |
||
41 | * Set the tracking parameters back to their base value |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function reset() |
||
51 | |||
52 | /** |
||
53 | * Inform the service how many rounds the report will go through |
||
54 | * |
||
55 | * @param integer $count |
||
56 | * @return $this |
||
57 | * @throws \InvalidArgumentException if count not an integer, zero or less |
||
58 | */ |
||
59 | public function setNumberDataSets($count) |
||
71 | |||
72 | /** |
||
73 | * Attempt to move the query counter forward and halt operations if at end |
||
74 | * |
||
75 | * @return boolean True if can continue |
||
76 | */ |
||
77 | public function tick() |
||
87 | |||
88 | /** |
||
89 | * Set the Doctrine query repository to be used |
||
90 | * |
||
91 | * @param ObjectRepository $repository |
||
92 | * @return $this |
||
93 | */ |
||
94 | public function setRepository(ObjectRepository $repository) |
||
100 | |||
101 | /** |
||
102 | * Set the Query Builder object which will form the basis of all information |
||
103 | * gathering |
||
104 | * |
||
105 | * @param object $query |
||
106 | * @return $this |
||
107 | */ |
||
108 | public function setQueryBase($query) |
||
115 | |||
116 | /** |
||
117 | * Influence the current query that will be run by adding modifier conditions |
||
118 | * |
||
119 | * @param string $field The database field |
||
120 | * @param array $options Options associated with the modifier |
||
121 | * @return $this |
||
122 | * @throws \InvalidArgumentException If minimum options are not set |
||
123 | */ |
||
124 | public function addModifier($field, $options = []) |
||
135 | |||
136 | /** |
||
137 | * Using the query base and available modifiers, create the base part of the |
||
138 | * database query to be run in the current data set |
||
139 | * |
||
140 | * @return object QueryBuilder |
||
141 | * @throws \Exception If an unrecognized query modifier is being used |
||
142 | */ |
||
143 | public function prepareQuery() |
||
172 | |||
173 | /** |
||
174 | * Attempt to build the actual database operation and return the result |
||
175 | * @return type |
||
176 | * @throws \Exception |
||
177 | */ |
||
178 | public function run() |
||
197 | |||
198 | /** |
||
199 | * Return the Doctrine repository object |
||
200 | * @return object |
||
201 | */ |
||
202 | public function getRepository() |
||
206 | |||
207 | /** |
||
208 | * Return the current set counter |
||
209 | * |
||
210 | * @return integer |
||
211 | */ |
||
212 | public function getNumberDataSetCurrent() |
||
216 | |||
217 | /** |
||
218 | * Return the total number of data sets to be run |
||
219 | * |
||
220 | * @return integer |
||
221 | */ |
||
222 | public function getNumberDataSetCount() |
||
226 | |||
227 | /** |
||
228 | * Return the current modifiers in their array definition format |
||
229 | * |
||
230 | * @return array |
||
231 | */ |
||
232 | public function getModifiers() |
||
236 | /** |
||
237 | * Display the set heading |
||
238 | * |
||
239 | * @return string |
||
240 | */ |
||
241 | public function getTitle() |
||
245 | } |
||
246 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.