/**
* @param string $c Type of database factory to create (Mysql, Sqlite,...)
* @param PDO $dbHandler
*/
public static function create($c, $dbHandler = null)
{
$c = ucfirst(strtolower($c));
if (!TypeAdapter::isValid($c)) {
throw new Exception("Database type support for ({$c}) not yet available");
}
$method = __NAMESPACE__ . "\\" . "TypeAdapter" . $c;
return new $method($dbHandler);
}