| @@ 38-51 (lines=14) @@ | ||
| 35 | return array('min' => array_shift($range), 'max' => array_shift($range)); |
|
| 36 | } |
|
| 37 | ||
| 38 | public function getItemsByIds(array $ids) |
|
| 39 | { |
|
| 40 | $this->checkConnection(); |
|
| 41 | $rootId = $this->getRootIdentifier(); |
|
| 42 | ||
| 43 | $items = $this->getQueryBuilder() |
|
| 44 | ->andWhere(sprintf('%s IN (:ids)', $rootId)) |
|
| 45 | ->setParameter('ids', $ids) |
|
| 46 | ->getQuery() |
|
| 47 | ->getResult($this->getHydrationMode()) |
|
| 48 | ; |
|
| 49 | ||
| 50 | return $items; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getItemsByInterval($idFrom, $idTo) |
|
| 54 | { |
|
| @@ 53-67 (lines=15) @@ | ||
| 50 | return $items; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getItemsByInterval($idFrom, $idTo) |
|
| 54 | { |
|
| 55 | $this->checkConnection(); |
|
| 56 | $rootId = $this->getRootIdentifier(); |
|
| 57 | ||
| 58 | $items = $this->getQueryBuilder() |
|
| 59 | ->andWhere(sprintf('%s >= :min AND %s < :max', $rootId, $rootId)) |
|
| 60 | ->setParameter('min', $idFrom) |
|
| 61 | ->setParameter('max', $idTo) |
|
| 62 | ->getQuery() |
|
| 63 | ->getResult($this->getHydrationMode()) |
|
| 64 | ; |
|
| 65 | ||
| 66 | return $items; |
|
| 67 | } |
|
| 68 | ||
| 69 | public function processItems(array $items) |
|
| 70 | { |
|