@@ 40-47 (lines=8) @@ | ||
37 | * @param TypeConfig[] $types |
|
38 | * @param array $config |
|
39 | */ |
|
40 | public function __construct($name, array $types, array $config) |
|
41 | { |
|
42 | $this->elasticSearchName = isset($config['elasticSearchName']) ? $config['elasticSearchName'] : $name; |
|
43 | $this->name = $name; |
|
44 | $this->settings = isset($config['settings']) ? $config['settings'] : []; |
|
45 | $this->types = $types; |
|
46 | $this->useAlias = isset($config['useAlias']) ? $config['useAlias'] : false; |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @return bool |
@@ 26-36 (lines=11) @@ | ||
23 | * @param TypeConfig[] $types |
|
24 | * @param array $config |
|
25 | */ |
|
26 | public function __construct($name, array $types, array $config) |
|
27 | { |
|
28 | $this->elasticSearchName = isset($config['elasticSearchName']) ? $config['elasticSearchName'] : $name; |
|
29 | $this->name = $name; |
|
30 | $this->settings = isset($config['settings']) ? $config['settings'] : array(); |
|
31 | if (!isset($config['template'])) { |
|
32 | throw new \InvalidArgumentException('Index template value must be set'); |
|
33 | } |
|
34 | $this->template = $config['template']; |
|
35 | $this->types = $types; |
|
36 | } |
|
37 | ||
38 | /** |
|
39 | * Gets index name pattern |