Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function getRepository(ElasticEntityManager $entityManager, $className) { |
||
16 | $hashKey = md5($className) . spl_object_hash($entityManager); |
||
17 | |||
18 | if (!isset($this->repositoryList[$hashKey])) { |
||
19 | $repository = new ElasticEntityRepository($entityManager, $className); |
||
20 | $this->repositoryList[$hashKey] = $repository; |
||
21 | } |
||
22 | |||
23 | return $this->repositoryList[$hashKey]; |
||
24 | } |
||
25 | } |