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 | public function __construct(ManagerRegistry $managerRegistry, RepositoryManagerInterface $repositoryManager) |
||
45 | { |
||
46 | $this->managerRegistry = $managerRegistry; |
||
47 | $this->repositoryManager = $repositoryManager; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function addType($indexTypeName, FinderInterface $finder, $repositoryName = null) |
||
57 | |||
58 | public function addEntity($entityName, $indexTypeName) |
||
62 | |||
63 | /** |
||
64 | * Returns custom repository if one specified otherwise returns a basic repository. |
||
65 | * |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function getRepository($entityName) |
||
82 | } |
||
83 |