@@ 103-113 (lines=11) @@ | ||
100 | */ |
|
101 | protected function isPropertyEnabled(string $property/*, string $resourceClass*/): bool |
|
102 | { |
|
103 | if (func_num_args() > 1) { |
|
104 | $resourceClass = func_get_arg(1); |
|
105 | } else { |
|
106 | if (__CLASS__ !== get_class($this)) { |
|
107 | $r = new \ReflectionMethod($this, __FUNCTION__); |
|
108 | if (__CLASS__ !== $r->getDeclaringClass()->getName()) { |
|
109 | @trigger_error(sprintf('Method %s() will have a second `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED); |
|
110 | } |
|
111 | } |
|
112 | $resourceClass = null; |
|
113 | } |
|
114 | ||
115 | if (null === $this->properties) { |
|
116 | // to ensure sanity, nested properties must still be explicitly enabled |
|
@@ 154-164 (lines=11) @@ | ||
151 | */ |
|
152 | protected function isPropertyNested(string $property/*, string $resourceClass*/): bool |
|
153 | { |
|
154 | if (func_num_args() > 1) { |
|
155 | $resourceClass = func_get_arg(1); |
|
156 | } else { |
|
157 | if (__CLASS__ !== get_class($this)) { |
|
158 | $r = new \ReflectionMethod($this, __FUNCTION__); |
|
159 | if (__CLASS__ !== $r->getDeclaringClass()->getName()) { |
|
160 | @trigger_error(sprintf('Method %s() will have a second `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED); |
|
161 | } |
|
162 | } |
|
163 | $resourceClass = null; |
|
164 | } |
|
165 | ||
166 | if (false === $pos = strpos($property, '.')) { |
|
167 | return false; |
|
@@ 272-282 (lines=11) @@ | ||
269 | */ |
|
270 | protected function extractProperties(Request $request/*, string $resourceClass*/): array |
|
271 | { |
|
272 | if (func_num_args() > 1) { |
|
273 | $resourceClass = func_get_arg(1); |
|
274 | } else { |
|
275 | if (__CLASS__ !== get_class($this)) { |
|
276 | $r = new \ReflectionMethod($this, __FUNCTION__); |
|
277 | if (__CLASS__ !== $r->getDeclaringClass()->getName()) { |
|
278 | @trigger_error(sprintf('Method %s() will have a second `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED); |
|
279 | } |
|
280 | } |
|
281 | $resourceClass = null; |
|
282 | } |
|
283 | ||
284 | $needsFixing = false; |
|
285 | ||
@@ 317-327 (lines=11) @@ | ||
314 | */ |
|
315 | protected function addJoinsForNestedProperty(string $property, string $rootAlias, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator/*, string $resourceClass*/): array |
|
316 | { |
|
317 | if (func_num_args() > 4) { |
|
318 | $resourceClass = func_get_arg(4); |
|
319 | } else { |
|
320 | if (__CLASS__ !== get_class($this)) { |
|
321 | $r = new \ReflectionMethod($this, __FUNCTION__); |
|
322 | if (__CLASS__ !== $r->getDeclaringClass()->getName()) { |
|
323 | @trigger_error(sprintf('Method %s() will have a fifth `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED); |
|
324 | } |
|
325 | } |
|
326 | $resourceClass = null; |
|
327 | } |
|
328 | ||
329 | $propertyParts = $this->splitPropertyParts($property, $resourceClass); |
|
330 | $parentAlias = $rootAlias; |