| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 15 | public function search(QueryFactory $qf, bool $fetchJoinCollection = true, int $mode = Query::HYDRATE_OBJECT) |
||
| 16 | { |
||
| 17 | $query = $qf->create($this->_em); |
||
| 18 | |||
| 19 | if ($p = $qf->getPaginator()) { |
||
| 20 | |||
| 21 | $query->setFirstResult($p->getOffset()); |
||
| 22 | $query->setMaxResults($p->getItemsPerPage()); |
||
| 23 | |||
| 24 | return new Paginator($query, $fetchJoinCollection); |
||
| 25 | } |
||
| 26 | |||
| 27 | return $query->getResult($mode); |
||
| 28 | } |
||
| 31 |