1 | <?php |
||
12 | class Index extends BaseIndex |
||
13 | { |
||
14 | private $originalName; |
||
15 | |||
16 | /** |
||
17 | * Stores created types to avoid recreation. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | private $typeCache = array(); |
||
22 | |||
23 | /** |
||
24 | * Returns the original name of the index if the index has been renamed for reindexing |
||
25 | * or realiasing purposes. |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | public function getOriginalName() |
||
30 | { |
||
31 | return $this->originalName ?: $this->_name; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @param string $type |
||
36 | */ |
||
37 | 4 | public function getType($type) |
|
45 | |||
46 | /** |
||
47 | * Reassign index name. |
||
48 | * |
||
49 | * While it's technically a regular setter for name property, it's specifically named overrideName, but not setName |
||
50 | * since it's used for a very specific case and normally should not be used |
||
51 | * |
||
52 | * @param string $name Index name |
||
53 | */ |
||
54 | public function overrideName($name) |
||
59 | } |
||
60 |