1 | <?php |
||
14 | class EntityRepository implements ObjectRepository, Selectable |
||
15 | { |
||
16 | /** @var ApiMetadata */ |
||
17 | private $metadata; |
||
18 | /** @var EntityManager */ |
||
19 | private $manager; |
||
20 | |||
21 | /** |
||
22 | 18 | * EntityRepository constructor. |
|
23 | * |
||
24 | 18 | * @param EntityManager $manager |
|
25 | 18 | * @param string $className |
|
26 | 18 | */ |
|
27 | public function __construct(EntityManager $manager, $className) |
||
32 | |||
33 | /** {@inheritdoc} */ |
||
34 | public function find($id) |
||
38 | |||
39 | /** {@inheritdoc} */ |
||
40 | public function getClassName() |
||
44 | |||
45 | 17 | /** {@inheritdoc} */ |
|
46 | public function findAll() |
||
50 | |||
51 | /** {@inheritdoc} */ |
||
52 | public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) |
||
58 | |||
59 | /** {@inheritdoc} */ |
||
60 | public function findOneBy(array $criteria) |
||
66 | |||
67 | /** |
||
68 | * @return EntityManager |
||
69 | */ |
||
70 | public function getManager() |
||
74 | |||
75 | /** {@inheritdoc} */ |
||
76 | 5 | public function matching(Criteria $criteria) |
|
80 | 5 | ||
81 | /** |
||
82 | * @return RpcClientInterface |
||
83 | */ |
||
84 | protected function getClient() |
||
88 | |||
89 | /** |
||
90 | * @return CrudsApiInterface |
||
91 | */ |
||
92 | protected function getApi() |
||
96 | |||
97 | /** |
||
98 | * @return ApiMetadata |
||
99 | */ |
||
100 | protected function getMetadata() |
||
104 | |||
105 | /** |
||
106 | * Hydrates object from given data or merges it to already fetched object |
||
107 | * |
||
108 | 1 | * @param mixed $data |
|
109 | * |
||
110 | 1 | * @return object |
|
111 | */ |
||
112 | protected function hydrateObject($data) |
||
116 | 1 | ||
117 | /** |
||
118 | 1 | * @param string $alias |
|
119 | * |
||
120 | * @return string |
||
121 | * @throws \OutOfBoundsException if no method exist |
||
122 | */ |
||
123 | protected function getClientMethod($alias) |
||
127 | } |
||
128 |