1 | <?php |
||
22 | class DoctrineSelectableAdapter implements AdapterInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var Selectable |
||
26 | */ |
||
27 | private $selectable; |
||
28 | |||
29 | /** |
||
30 | * @var Criteria |
||
31 | */ |
||
32 | private $criteria; |
||
33 | |||
34 | /** |
||
35 | * Constructor. |
||
36 | * |
||
37 | * @param Selectable $selectable An implementation of the Selectable interface. |
||
38 | * @param Criteria $criteria A Doctrine criteria. |
||
39 | */ |
||
40 | 2 | public function __construct(Selectable $selectable, Criteria $criteria) |
|
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | 1 | public function getNbResults() |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function getSlice($offset, $length) |
|
71 | |||
72 | 2 | private function createCriteria($firstResult, $maxResult) |
|
80 | } |
||
81 |