From 2f7fa6687cfb3108598f43478e9b7b3bb9b65c60 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 17 Jun 2011 12:33:50 -0700 Subject: [PATCH] Added "driver" method to System\DB. --- system/db.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/system/db.php b/system/db.php index 283ca970..fbdcaf1f 100644 --- a/system/db.php +++ b/system/db.php @@ -94,4 +94,15 @@ public static function table($table, $connection = null) 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); + } + } \ No newline at end of file