src/services/Model.php 1 location
|
@@ 330-341 (lines=12) @@
|
327 |
|
* @param string $toScenario |
328 |
|
* @return BaseModel[] |
329 |
|
*/ |
330 |
|
public function findAllByQuery(QueryInterface $query, string $toScenario = null): array |
331 |
|
{ |
332 |
|
|
333 |
|
$models = array(); |
334 |
|
|
335 |
|
foreach ($query->all() as $record) { |
336 |
|
$models[] = $this->findByRecord($record, $toScenario); |
337 |
|
} |
338 |
|
|
339 |
|
return $models; |
340 |
|
|
341 |
|
} |
342 |
|
|
343 |
|
/** |
344 |
|
* @param QueryInterface $query |
src/services/Object.php 1 location
|
@@ 333-344 (lines=12) @@
|
330 |
|
* @param string $toScenario |
331 |
|
* @return BaseObject[] |
332 |
|
*/ |
333 |
|
public function findAllByQuery(QueryInterface $query, string $toScenario = null): array |
334 |
|
{ |
335 |
|
|
336 |
|
$objects = array(); |
337 |
|
|
338 |
|
foreach ($query->all() as $record) { |
339 |
|
$objects[] = $this->findByRecord($record, $toScenario); |
340 |
|
} |
341 |
|
|
342 |
|
return $objects; |
343 |
|
|
344 |
|
} |
345 |
|
|
346 |
|
/** |
347 |
|
* @param QueryInterface $query |