Ejemplo n.º 1
0
 /**
  * @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];
 }
Ejemplo n.º 2
0
 /**
  * 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];
 }