1 | <?php |
||
16 | class RepositoryManager implements RepositoryManagerInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | private $types; |
||
22 | |||
23 | /** |
||
24 | * @var Repository[] |
||
25 | */ |
||
26 | private $repositories; |
||
27 | |||
28 | 5 | public function __construct() |
|
33 | |||
34 | 5 | public function addType($indexTypeName, FinderInterface $finder, $repositoryName = null) |
|
41 | |||
42 | /** |
||
43 | * Return repository for entity. |
||
44 | * |
||
45 | * Returns custom repository if one specified otherwise |
||
46 | * returns a basic repository. |
||
47 | * |
||
48 | * @param string $typeName |
||
49 | * |
||
50 | * @return Repository |
||
51 | */ |
||
52 | 5 | public function getRepository($typeName) |
|
67 | |||
68 | /** |
||
69 | * @param $typeName |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | 4 | protected function getRepositoryName($typeName) |
|
81 | |||
82 | /** |
||
83 | * @param $typeName |
||
84 | * |
||
85 | * @return mixed |
||
86 | */ |
||
87 | 4 | private function createRepository($typeName) |
|
95 | } |
||
96 |