1 | <?php |
||
33 | class RelationalRepository extends EntityRepository implements Repository, SpecificationAwareInterface |
||
34 | { |
||
35 | use SpecificationRepositoryTrait; |
||
36 | use RepositoryTrait; |
||
37 | use EventsTrait; |
||
38 | use PaginatorTrait; |
||
39 | |||
40 | /** |
||
41 | * Class name. |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $className; |
||
46 | |||
47 | /** |
||
48 | * Class alias. |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $classAlias; |
||
53 | |||
54 | /** |
||
55 | * Get class alias. |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | protected function getClassAlias(): string |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function getClassName(): string |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | protected function getManager(): EntityManager |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | * |
||
91 | * @param array $criteria |
||
92 | * @param array|null $orderBy |
||
93 | * @param int $itemsPerPage |
||
94 | * |
||
95 | * @return \Zend\Paginator\Paginator |
||
96 | */ |
||
97 | public function findPaginatedBy($criteria, array $orderBy = [], int $itemsPerPage = 10): Paginator |
||
103 | |||
104 | /** |
||
105 | * Get query builder from criteria array. |
||
106 | * |
||
107 | * @param array $criteria |
||
108 | * @param array $orderBy |
||
109 | * |
||
110 | * @return QueryBuilder |
||
111 | */ |
||
112 | protected function getQueryBuilderFromCriteria(array $criteria, array $orderBy = []): QueryBuilder |
||
145 | |||
146 | /** |
||
147 | * Paginate query. |
||
148 | * |
||
149 | * @param Query $query |
||
150 | * @param int $itemsPerPage |
||
151 | * |
||
152 | * @return Paginator |
||
153 | */ |
||
154 | protected function paginate(Query $query, int $itemsPerPage = 10): Paginator |
||
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | * |
||
162 | * @param array|QueryBuilder $criteria |
||
163 | * |
||
164 | * @return int |
||
165 | */ |
||
166 | public function countBy($criteria): int |
||
170 | } |
||
171 |