public static function sanitizeDbParameters($dbParams) {
        switch (self::getDbType()) {
            case 'mysql':
                if (empty($dbParams['unix_socket'])) {
                    unset($dbParams['unix_socket']);
                }
                
                if (empty($dbParams['charset'])) {
                    unset($dbParams['charset']);
                }
                break;
            case 'sqlite':
                if (empty($dbParams['user'])) {
                    unset($dbParams['user']);
                }
                
                if (empty($dbParams['password'])) {
                    unset($dbParams['password']);
                }
                
                if (empty($dbParams['host'])) {
                    unset($dbParams['host']);
                }
                if (empty($dbParams['port'])) {
                    unset($dbParams['port']);
                }                
                break;
        }
        
        return $dbParams;
    }