Added "driver" method to System\DB.

This commit is contained in:
Taylor Otwell 2011-06-17 12:33:50 -07:00
parent 0f8f3f347c
commit 2f7fa6687c

View File

@ -94,4 +94,15 @@ class DB {
return new DB\Query($table, $connection);
}
/**
* Get the driver name for a database connection.
*
* @param string $connection
* @return string
*/
public static function driver($connection = null)
{
return static::connection($connection)->getAttribute(\PDO::ATTR_DRIVER_NAME);
}
}