public function add_index($name, $type, $fields, $hints = array()) {
        $index = new xmldb_index($name, $type, $fields, $hints);
        $this->addIndex($index);
    }
public function add_index($name, $type, $fields, $hints = array()) {
        $index = new xmldb_index($name, $type, $fields, $hints);
        $this->addIndex($index);
    }
public function add_index ( $ name , $ type , $ fields , $ hints = array ( ) ) { $ index = new xmldb_index ( $ name , $ type , $ fields , $ hints ) ; $ this -> addIndex ( $ index ) ; }
This function will add one new index to the table with all
its attributes defined

@param string $name name of the index
@param int $type XMLDB_INDEX_UNIQUE, XMLDB_INDEX_NOTUNIQUE
@param array $fields an array of fieldnames to build the index over
@param array $hints optional index type hints
This function will add one new index to the table with all its attributes defined