1 | <?php |
||
21 | class Index extends BaseIndex |
||
22 | { |
||
23 | private $originalName; |
||
24 | |||
25 | /** |
||
26 | * Stores created types to avoid recreation. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private $typeCache = []; |
||
31 | |||
32 | /** |
||
33 | * Returns the original name of the index if the index has been renamed for reindexing |
||
34 | * or realiasing purposes. |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | public function getOriginalName() |
||
39 | { |
||
40 | return $this->originalName ?: $this->_name; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param string $type |
||
45 | * |
||
46 | * @return mixed |
||
47 | */ |
||
48 | 13 | public function getType($type) |
|
56 | |||
57 | /** |
||
58 | * Reassign index name. |
||
59 | * |
||
60 | * While it's technically a regular setter for name property, it's specifically named overrideName, but not setName |
||
61 | * since it's used for a very specific case and normally should not be used |
||
62 | * |
||
63 | * @param string $name Index name |
||
64 | */ |
||
65 | public function overrideName($name) |
||
70 | } |
||
71 |