1 | <?php |
||
21 | class QueryObject extends Select implements QueryObjectInterface |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @var RepositoryInterface |
||
26 | */ |
||
27 | protected $repository; |
||
28 | |||
29 | /** |
||
30 | * QueryObject has a repository as a dependency. |
||
31 | * |
||
32 | * @param RepositoryInterface $repository |
||
33 | */ |
||
34 | public function __construct(RepositoryInterface $repository) |
||
42 | |||
43 | /** |
||
44 | * Retrieve all records matching this select query |
||
45 | * |
||
46 | * @return \Slick\Database\RecordList |
||
47 | */ |
||
48 | public function all() |
||
53 | |||
54 | /** |
||
55 | * Retrieve first record matching this select query |
||
56 | * |
||
57 | * @return mixed |
||
58 | */ |
||
59 | public function first() |
||
66 | } |