more 2.0 changes

This commit is contained in:
Taylor Otwell
2011-08-19 20:12:39 -05:00
parent 73b1cb78f4
commit 5b85edb23b
38 changed files with 951 additions and 614 deletions

View File

@@ -0,0 +1,27 @@
<?php namespace Laravel\DB\Query;
use Laravel\DB\Query;
use Laravel\DB\Connection;
class Factory {
/**
* Create a new query instance for a given driver.
*
* @param string $table
* @param Connection $connection
* @return Query
*/
public static function make($table, Connection $connection)
{
switch ($connection->driver())
{
case 'postgres':
return new Postgres($table, $connection);
default:
return new Query($table, $connection);
}
}
}