1 | <?php |
||
24 | class ProxyQuery implements ProxyQueryInterface |
||
25 | { |
||
26 | /** |
||
27 | * Query Builder Fluent interface for the QOM. |
||
28 | * |
||
29 | * @var QueryBuilder |
||
30 | */ |
||
31 | protected $qb; |
||
32 | |||
33 | /** |
||
34 | * The alias name used for the document FQN. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $alias; |
||
39 | |||
40 | /** |
||
41 | * The root path. |
||
42 | * |
||
43 | * @var string|null |
||
44 | */ |
||
45 | protected $root; |
||
46 | |||
47 | /** |
||
48 | * Property that determines the Ordering of the results. |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $sortBy; |
||
53 | |||
54 | /** |
||
55 | * Ordering of the results (ASC, DESC). |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | protected $sortOrder; |
||
60 | |||
61 | /** |
||
62 | * PHPCR ODM Document Manager. |
||
63 | * |
||
64 | * @var DocumentManager |
||
65 | */ |
||
66 | protected $documentManager; |
||
67 | |||
68 | /** |
||
69 | * Name of this document class. |
||
70 | * |
||
71 | * @var string |
||
72 | */ |
||
73 | protected $documentName; |
||
74 | |||
75 | /** |
||
76 | * Creates a Query Builder from the QOMFactory. |
||
77 | * |
||
78 | * @param string $alias Short name to use instead of the FQN |
||
79 | * of the document |
||
80 | * |
||
81 | * @throws \InvalidArgumentException if alias is not a string or an empty string |
||
82 | */ |
||
83 | public function __construct(QueryBuilder $queryBuilder, $alias) |
||
92 | |||
93 | /** |
||
94 | * Allows for direct calls to the QueryBuilder. |
||
95 | * |
||
96 | * @param string $name name of the method |
||
97 | * @param array $args arguments of the call |
||
98 | * |
||
99 | * @codeCoverageIgnore |
||
100 | */ |
||
101 | public function __call($name, $args) |
||
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getAlias() |
||
113 | |||
114 | /** |
||
115 | * @param string $root root path to restrict what documents to find |
||
116 | */ |
||
117 | public function setRootPath($root): void |
||
121 | |||
122 | /** |
||
123 | * Executes the query, applying the source, the constraint of documents being of the phpcr:class of |
||
124 | * this kind of document and builds an array of retrieved documents. |
||
125 | * |
||
126 | * @param array $params doesn't have any effect |
||
127 | * @param mixed $hydrationMode doesn't have any effect |
||
128 | * |
||
129 | * @throws \Exception if $this->sortOrder is not ASC or DESC |
||
130 | * |
||
131 | * @return array of documents |
||
132 | */ |
||
133 | public function execute(array $params = [], $hydrationMode = null) |
||
166 | |||
167 | /** |
||
168 | * Set the property to be sorted by. |
||
169 | * |
||
170 | * {@inheritdoc} |
||
171 | */ |
||
172 | public function setSortBy($parentAssociationMappings, $fieldMapping) |
||
178 | |||
179 | /** |
||
180 | * Gets the property that defines the ordering. |
||
181 | * |
||
182 | * @return string the property to be sorted by |
||
183 | */ |
||
184 | public function getSortBy() |
||
188 | |||
189 | /** |
||
190 | * Set the sort ordering. |
||
191 | * |
||
192 | * {@inheritdoc} |
||
193 | * |
||
194 | * @param string $sortOrder (ASC|DESC) |
||
195 | * |
||
196 | * @throws \InvalidArgumentException if $sortOrder is not one of ASC or DESC |
||
197 | */ |
||
198 | public function setSortOrder($sortOrder) |
||
207 | |||
208 | /** |
||
209 | * Get the ordering. |
||
210 | * |
||
211 | * @return string ASC or DESC |
||
212 | */ |
||
213 | public function getSortOrder() |
||
217 | |||
218 | /** |
||
219 | * @codeCoverageIgnore |
||
220 | * |
||
221 | * @throws \Exception |
||
222 | */ |
||
223 | public function getSingleScalarResult(): void |
||
228 | |||
229 | /** |
||
230 | * Gets the QueryBuilder. |
||
231 | * |
||
232 | * @return QueryBuilder |
||
233 | */ |
||
234 | public function getQueryBuilder() |
||
238 | |||
239 | /** |
||
240 | * Sets the first result (offset). |
||
241 | * |
||
242 | * {@inheritdoc} |
||
243 | */ |
||
244 | public function setFirstResult($firstResult) |
||
250 | |||
251 | /** |
||
252 | * Gets the first result (offset). |
||
253 | * |
||
254 | * @return int the offset |
||
255 | */ |
||
256 | public function getFirstResult() |
||
260 | |||
261 | /** |
||
262 | * Set maximum number of results to retrieve. |
||
263 | * |
||
264 | * {@inheritdoc} |
||
265 | */ |
||
266 | public function setMaxResults($maxResults) |
||
272 | |||
273 | /** |
||
274 | * Gets the maximum number of results to retrieve. |
||
275 | * |
||
276 | * @return int |
||
277 | */ |
||
278 | public function getMaxResults() |
||
282 | |||
283 | /** |
||
284 | * Sets the document manager. |
||
285 | */ |
||
286 | public function setDocumentManager(DocumentManager $documentManager) |
||
292 | |||
293 | /** |
||
294 | * Gets the document manager. |
||
295 | * |
||
296 | * @return DocumentManager $documentManager |
||
297 | */ |
||
298 | public function getDocumentManager() |
||
302 | |||
303 | public function getUniqueParameterId(): void |
||
306 | |||
307 | public function entityJoin(array $associationMappings): void |
||
310 | } |
||
311 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: