src/services/Model.php 1 location
|
@@ 226-237 (lines=12) @@
|
| 223 |
|
* @param string $toScenario |
| 224 |
|
* @return BaseModel[] |
| 225 |
|
*/ |
| 226 |
|
public function findAllByQuery(QueryInterface $query, string $toScenario = null): array |
| 227 |
|
{ |
| 228 |
|
|
| 229 |
|
$models = array(); |
| 230 |
|
|
| 231 |
|
foreach ($query->all() as $record) { |
| 232 |
|
$models[] = $this->findByRecord($record, $toScenario); |
| 233 |
|
} |
| 234 |
|
|
| 235 |
|
return $models; |
| 236 |
|
|
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
/** |
| 240 |
|
* @param QueryInterface $query |
src/services/Object.php 1 location
|
@@ 222-233 (lines=12) @@
|
| 219 |
|
* @param string $toScenario |
| 220 |
|
* @return BaseObject[] |
| 221 |
|
*/ |
| 222 |
|
public function findAllByQuery(QueryInterface $query, string $toScenario = null): array |
| 223 |
|
{ |
| 224 |
|
|
| 225 |
|
$objects = array(); |
| 226 |
|
|
| 227 |
|
foreach ($query->all() as $record) { |
| 228 |
|
$objects[] = $this->findByRecord($record, $toScenario); |
| 229 |
|
} |
| 230 |
|
|
| 231 |
|
return $objects; |
| 232 |
|
|
| 233 |
|
} |
| 234 |
|
|
| 235 |
|
/** |
| 236 |
|
* @param QueryInterface $query |