public function hasIndex($name)
    {
        foreach ($this->indices as $idx) {
            if ($idx->getName() == $name) {
                return true;
            }
        }

        return false;
    }
public function hasIndex($name)
    {
        foreach ($this->indices as $idx) {
            if ($idx->getName() == $name) {
                return true;
            }
        }

        return false;
    }
public function hasIndex ( $ name ) { foreach ( $ this -> indices as $ idx ) { if ( $ idx -> getName ( ) == $ name ) { return true ; } } return false ; }
Checks if the table has a index by name.

@param  string  $name
@return boolean
Checks if the table has a index by name .