/** * @param string $indexName * @return Index */ public function getIndex($indexName) { $indexName = strtolower($indexName); if (!$this->hasIndex($indexName)) { throw SchemaException::indexDoesNotExist($indexName, $this->_name); } return $this->_indexes[$indexName]; }
/** * Returns the Index with the given name. * * @param string $indexName The index name. * * @return Index * * @throws SchemaException If the index does not exist. */ public function getIndex($indexName) { $indexName = $this->normalizeIdentifier($indexName); if (!$this->hasIndex($indexName)) { throw SchemaException::indexDoesNotExist($indexName, $this->_name); } return $this->_indexes[$indexName]; }