| @@ 134-142 (lines=9) @@ | ||
| 131 | * |
|
| 132 | * @return $this |
|
| 133 | */ |
|
| 134 | public function setIndex($index): self |
|
| 135 | { |
|
| 136 | if ($index instanceof Index) { |
|
| 137 | $index = $index->getName(); |
|
| 138 | } |
|
| 139 | $this->_metadata['_index'] = $index; |
|
| 140 | ||
| 141 | return $this; |
|
| 142 | } |
|
| 143 | ||
| 144 | /** |
|
| 145 | * @param string $id |
|
| @@ 56-65 (lines=10) @@ | ||
| 53 | * |
|
| 54 | * @return $this |
|
| 55 | */ |
|
| 56 | public function setIndex($index): self |
|
| 57 | { |
|
| 58 | if ($index instanceof Index) { |
|
| 59 | $index = $index->getName(); |
|
| 60 | } |
|
| 61 | ||
| 62 | $this->_index = (string) $index; |
|
| 63 | ||
| 64 | return $this; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @return string|null |
|