| @@ 100-105 (lines=6) @@ | ||
| 97 | { |
|
| 98 | $result = []; |
|
| 99 | $select = $this->selectQuery($condition); |
|
| 100 | if ($rows = $select->execute()->fetchAll(\PDO::FETCH_ASSOC)) { |
|
| 101 | foreach ($rows as $row) { |
|
| 102 | $entity = $this->rowToEntity($row); |
|
| 103 | $result[$entity->getId()] = $entity; |
|
| 104 | } |
|
| 105 | } |
|
| 106 | ||
| 107 | return $result; |
|
| 108 | } |
|
| @@ 170-175 (lines=6) @@ | ||
| 167 | $result = []; |
|
| 168 | $select = $this->selectQuery($condition); |
|
| 169 | $select->select(['t1.' . $field, 't1.' . $key]); |
|
| 170 | if ($rows = $select->execute()->fetchAll(\PDO::FETCH_ASSOC)) { |
|
| 171 | foreach ($rows as $row) { |
|
| 172 | $this->unserializeFields($row); |
|
| 173 | $result[$row[$key]] = $row[$field]; |
|
| 174 | } |
|
| 175 | } |
|
| 176 | ||
| 177 | return $result; |
|
| 178 | } |
|