Lines Matching refs:index
85 * Adds a index to the list.
87 * @param Index $index Index object or string
91 public function addIndex($index): self
93 if ($index instanceof Index) {
94 $index = $index->getName();
105 if (!\is_scalar($index)) {
109 return $this->addIndexByName((string) $index);
113 * Adds an index to the list.
115 public function addIndexByName(string $index): self
117 $this->_indices[] = $index;
129 foreach ($indices as $index) {
130 if (\is_string($index)) {
138 $this->addIndexByName($index);
143 if (!$index instanceof Index) {
147 $this->addIndex($index);
158 foreach ($indices as $index) {
159 if (!\is_string($index)) {
162 $this->addIndexByName($index);
269 * @param Index $index
271 public function hasIndex($index): bool
273 if ($index instanceof Index) {
274 $index = $index->getName();
285 return $this->hasIndexByName($index);
288 public function hasIndexByName(string $index): bool
290 return \in_array($index, $this->_indices, true);