1 | <?php |
||
18 | trait IndexConfigTrait |
||
19 | { |
||
20 | /** |
||
21 | * The name of the index for ElasticSearch. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | private $elasticSearchName; |
||
26 | |||
27 | /** |
||
28 | * The model of the index |
||
29 | * |
||
30 | * @var string|null |
||
31 | */ |
||
32 | private $model; |
||
33 | |||
34 | /** |
||
35 | * The internal name of the index. May not be the same as the name used in ElasticSearch, |
||
36 | * especially if aliases are enabled. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | private $name; |
||
41 | |||
42 | /** |
||
43 | * An array of settings sent to ElasticSearch when creating the index. |
||
44 | * |
||
45 | * @var array |
||
46 | */ |
||
47 | private $settings; |
||
48 | |||
49 | /** |
||
50 | * All types that belong to this index. |
||
51 | * |
||
52 | * @var TypeConfig[] |
||
53 | */ |
||
54 | private $types; |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | 11 | public function getElasticSearchName(): string |
|
63 | |||
64 | 8 | public function getModel(): ?string |
|
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | 3 | public function getName(): string |
|
76 | |||
77 | /** |
||
78 | * @return array |
||
79 | */ |
||
80 | 10 | public function getSettings(): array |
|
84 | |||
85 | /**s |
||
86 | * @throws \InvalidArgumentException |
||
87 | */ |
||
88 | 2 | public function getType(string $typeName): TypeConfig |
|
96 | |||
97 | /** |
||
98 | * @return \FOS\ElasticaBundle\Configuration\TypeConfig[] |
||
99 | */ |
||
100 | 9 | public function getTypes() |
|
104 | } |
||
105 |