1 | <?php |
||
26 | abstract class EntityRepository |
||
27 | { |
||
28 | /** |
||
29 | * @var ObjectManager |
||
30 | */ |
||
31 | protected $manager; |
||
32 | |||
33 | /** |
||
34 | * @var DoctrineEntityRepository |
||
35 | */ |
||
36 | protected $repository; |
||
37 | |||
38 | /** |
||
39 | * @var PaginatorInterface |
||
40 | */ |
||
41 | protected $paginator; |
||
42 | |||
43 | public function __construct(ManagerRegistry $managerRegistry, PaginatorInterface $paginator, string $class) |
||
49 | |||
50 | /** |
||
51 | * @param string $name |
||
52 | * @param array $arguments |
||
53 | * |
||
54 | * @return mixed |
||
55 | */ |
||
56 | public function __call($name, $arguments) |
||
66 | |||
67 | /** |
||
68 | * Saves the $object. |
||
69 | * |
||
70 | * @param $object |
||
71 | */ |
||
72 | public function save($object) |
||
77 | |||
78 | /** |
||
79 | * @param int $page |
||
80 | * @param int $itemsPerPage |
||
81 | * @param array $orderBy |
||
82 | * @param QueryBuilder $qb |
||
83 | * |
||
84 | * @return PaginationInterface |
||
85 | */ |
||
86 | public function findAllWithPaging($page = 1, $itemsPerPage = 100, array $orderBy = [], QueryBuilder $qb = null): PaginationInterface |
||
104 | |||
105 | /** |
||
106 | * @return QueryBuilder |
||
107 | */ |
||
108 | public function getQueryBuilder(): QueryBuilder |
||
112 | } |
||
113 |