forked from FriendsOfSymfony/FOSElasticaBundle
/
IndexConfigInterface.php
76 lines (64 loc) · 1.78 KB
/
IndexConfigInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/*
* This file is part of the FOSElasticaBundle package.
*
* (c) FriendsOfSymfony <https://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FOS\ElasticaBundle\Configuration;
/**
* Interface Index config interface.
*
* @author Dmitry Balabka <dmitry.balabka@intexsys.lv>
*
* @phpstan-type TMapping = array<string, mixed>
* @phpstan-type TSettings = array<string, mixed>
* @phpstan-type TDynamicDateFormats = list<non-empty-string>
* @phpstan-type TDynamic = true|'runtime'
* @phpstan-type TConfig = array{
* elasticsearch_name?: string,
* name: string,
* settings?: TSettings,
* use_alias?: bool,
* config: TElasticConfig,
* mapping: TMapping,
* model: mixed,
* template?: string,
* }
* @phpstan-type TElasticConfig = array{
* date_detection?: bool,
* dynamic_date_formats?: TDynamicDateFormats,
* analyzer?: string,
* numeric_detection?: bool,
* dynamic?: TDynamic
* }
*/
interface IndexConfigInterface
{
public function getElasticSearchName(): string;
public function getModel(): ?string;
public function getName(): string;
/**
* @phpstan-return TSettings
*/
public function getSettings(): array;
public function getDateDetection(): ?bool;
/**
* @phpstan-return ?TDynamicDateFormats
*/
public function getDynamicDateFormats(): ?array;
public function getAnalyzer(): ?string;
/**
* @phpstan-return TMapping
*/
public function getMapping(): array;
public function getNumericDetection(): ?bool;
/**
* @return string|bool|null
*
* @phpstan-return ?TDynamic
*/
public function getDynamic();
}