moving some laravel classes around, switching alias to reflect changes. added some factories. removed system ioc container config file.

This commit is contained in:
Taylor Otwell
2011-11-11 21:27:30 -06:00
parent b625ebdcf3
commit b6ab0b08ce
23 changed files with 384 additions and 388 deletions

View File

@@ -0,0 +1,29 @@
<?php namespace Laravel\Database\Connectors;
class Factory {
/**
* Create a new database connector instance.
*
* @param string $driver
* @return Connector
*/
public static function make($driver)
{
switch ($driver)
{
case 'sqlite':
return new SQLite(DATABASE_PATH);
case 'mysql':
return new MySQL;
case 'pgsql':
return new Postgres;
default:
throw new \Exception("Database driver [$driver] is not supported.");
}
}
}