public static function driverClass($driver) {
        if ($driver instanceof PDO) {
            $name = $driver->getAttribute(PDO::ATTR_DRIVER_NAME);
        } else {
            $name = (string)$driver;
        }

        $name = strtolower($name);
        return isset(self::$drivers[$name]) ? self::$drivers[$name] : null;
    }
public static function driverClass($driver) {
        if ($driver instanceof PDO) {
            $name = $driver->getAttribute(PDO::ATTR_DRIVER_NAME);
        } else {
            $name = (string)$driver;
        }

        $name = strtolower($name);
        return isset(self::$drivers[$name]) ? self::$drivers[$name] : null;
    }
public static function driverClass ( $ driver ) { if ( $ driver instanceof PDO ) { $ name = $ driver -> getAttribute ( PDO :: ATTR_DRIVER_NAME ) ; } else { $ name = ( string ) $ driver ; } $ name = strtolower ( $ name ) ; return isset ( self :: $ drivers [ $ name ] ) ? self :: $ drivers [ $ name ] : null ; }
Get the name of the class that handles a database driver.

@param string|PDO $driver The name of the driver or a database connection.
@return null|string Returns the driver classname or **null** if one isn't found.
Get the name of the class that handles a database driver .