1 | <?php |
||
29 | class MongoDBRepository extends DocumentRepository implements Repository |
||
30 | { |
||
31 | use RepositoryTrait; |
||
32 | use EventsTrait; |
||
33 | use PaginatorTrait; |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function getClassName(): string |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | protected function getManager(): DocumentManager |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | * |
||
54 | * @param array $criteria |
||
55 | * @param array $orderBy |
||
56 | * @param int $itemsPerPage |
||
57 | * |
||
58 | * @return \Zend\Paginator\Paginator |
||
59 | */ |
||
60 | public function findPaginatedBy($criteria, array $orderBy = [], int $itemsPerPage = 10): Paginator |
||
64 | |||
65 | /** |
||
66 | * Paginate MongoDB cursor. |
||
67 | * |
||
68 | * @param Cursor $cursor |
||
69 | * @param int $itemsPerPage |
||
70 | * |
||
71 | * @return Paginator |
||
72 | */ |
||
73 | protected function paginate(Cursor $cursor, int $itemsPerPage = 10): Paginator |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | * |
||
81 | * @param array $criteria |
||
82 | * |
||
83 | * @return int |
||
84 | */ |
||
85 | public function countBy($criteria): int |
||
89 | } |
||
90 |