コード例 #1
0
ファイル: Table.php プロジェクト: michaelnavarro/zc
 /**
  * @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];
 }
コード例 #2
0
ファイル: Table.php プロジェクト: BozzaCoon/SPHERE-Framework
 /**
  * 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];
 }