1 | <?php |
||
17 | class ConfigManager implements ManagerInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var IndexConfig[] |
||
21 | */ |
||
22 | private $indexes = array(); |
||
23 | |||
24 | /** |
||
25 | * @param Source\SourceInterface[] $sources |
||
26 | */ |
||
27 | 4 | public function __construct(array $sources) |
|
28 | { |
||
29 | 4 | foreach ($sources as $source) { |
|
30 | 4 | $this->indexes = array_merge($source->getConfiguration(), $this->indexes); |
|
31 | } |
||
32 | 4 | } |
|
33 | |||
34 | 4 | public function getIndexConfiguration($indexName) |
|
42 | |||
43 | public function getIndexNames() |
||
44 | { |
||
45 | return array_keys($this->indexes); |
||
46 | } |
||
47 | |||
48 | 1 | public function getTypeConfiguration($indexName, $typeName) |
|
59 | |||
60 | 4 | public function hasIndexConfiguration($indexName) |
|
64 | } |
||
65 |