1 | <?php |
||
24 | class RepositoryManager implements RepositoryManagerInterface |
||
25 | { |
||
26 | /** @var array */ |
||
27 | protected $entities = []; |
||
28 | |||
29 | /** @var array */ |
||
30 | protected $repositories = []; |
||
31 | |||
32 | /** @var ManagerRegistry */ |
||
33 | protected $managerRegistry; |
||
34 | |||
35 | /** |
||
36 | * @var RepositoryManagerInterface |
||
37 | */ |
||
38 | private $repositoryManager; |
||
39 | |||
40 | /** |
||
41 | * @param ManagerRegistry $managerRegistry |
||
42 | * @param RepositoryManagerInterface $repositoryManager |
||
43 | */ |
||
44 | 3 | public function __construct(ManagerRegistry $managerRegistry, RepositoryManagerInterface $repositoryManager) |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function addIndex($indexName, FinderInterface $finder, $repositoryName = null) |
||
54 | { |
||
55 | throw new \LogicException(__METHOD__.' should not be called. Call addIndex on the main repository manager'); |
||
56 | } |
||
57 | |||
58 | 3 | public function addEntity($entityName, $indexName) |
|
62 | |||
63 | /** |
||
64 | * Returns custom repository if one specified otherwise returns a basic repository. |
||
65 | * |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 3 | public function getRepository($entityName) |
|
82 | } |
||
83 |