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