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) { |
||
48 | |||
49 | /** |
||
50 | * @param string $name |
||
51 | * @param array $arguments |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public function __call($name, $arguments) |
||
64 | |||
65 | /** |
||
66 | * Saves the $object |
||
67 | * |
||
68 | * @param $object |
||
69 | */ |
||
70 | public function save($object) |
||
75 | |||
76 | /** |
||
77 | * @param int $page |
||
78 | * @param int $itemsPerPage |
||
79 | * @param array $orderBy |
||
80 | * @param QueryBuilder $qb |
||
81 | * @return PaginationInterface |
||
82 | */ |
||
83 | public function findAllWithPaging($page = 1, $itemsPerPage = 100, array $orderBy = [], QueryBuilder $qb = null) : PaginationInterface |
||
101 | |||
102 | /** |
||
103 | * @param string $alias |
||
104 | * @return QueryBuilder |
||
105 | */ |
||
106 | public function getQueryBuilder(string $alias) : QueryBuilder |
||
110 | } |
||
111 |