public function hasIndex($index) { if ($index instanceof Index) { $index = $index->getName(); } return in_array($index, $this->_indices); }