1 | <?php |
||
10 | class PopulatorManager |
||
11 | { |
||
12 | /** |
||
13 | * @var PopulationFetcherInterface[][] |
||
14 | */ |
||
15 | protected $fetchers = []; |
||
16 | |||
17 | /** |
||
18 | * @var TransformerManager |
||
19 | */ |
||
20 | private $transformer; |
||
21 | |||
22 | /** |
||
23 | * @param TransformerManager $transformer |
||
24 | */ |
||
25 | public function __construct(TransformerManager $transformer) |
||
29 | |||
30 | /** |
||
31 | * @param $indexId |
||
32 | * @param $typeName |
||
33 | * @param PopulationFetcherInterface $fetcher |
||
34 | */ |
||
35 | public function registerFetcher(PopulationFetcherInterface $fetcher, $indexId, $typeName) |
||
43 | |||
44 | /** |
||
45 | * @param Type $type |
||
46 | * @return PopulationFetcherInterface |
||
47 | */ |
||
48 | protected function getFetcherForType(Type $type) |
||
59 | |||
60 | /** |
||
61 | * @param Type $type |
||
62 | * @return Populator |
||
63 | */ |
||
64 | public function createPopulator(Type $type) |
||
72 | } |