public static function singleton($schema, $table, $index_name = '')
{
Index::_loadIndexes($table, $schema);
if (!isset(Index::$_registry[$schema][$table][$index_name])) {
$index = new Index();
if (strlen($index_name) > 0) {
$index->setName($index_name);
Index::$_registry[$schema][$table][$index->getName()] = $index;
}
return $index;
} else {
return Index::$_registry[$schema][$table][$index_name];
}
}