public static function register($config)
    {
        // Validate config
        $missing = array_diff(['title', 'class', 'helperClass', 'supported'], array_keys($config));
        if ($missing) {
            throw new InvalidArgumentException(
                "Missing database helper config keys: '" . implode("', '", $missing) . "'"
            );
        }

        // Guess missing module text if not given
        if (empty($config['missingModuleText'])) {
            if (empty($config['module'])) {
                $moduleText = 'Module for database connector ' . $config['title'] . 'is missing.';
            } else {
                $moduleText = "The SilverStripe module '" . $config['module'] . "' is missing.";
            }
            $config['missingModuleText'] = $moduleText
                . ' Please install it via composer or from http://addons.silverstripe.org/.';
        }

        // Set missing text
        if (empty($config['missingExtensionText'])) {
            $config['missingExtensionText'] = 'The PHP extension is missing, please enable or install it.';
        }

        // set default fields if none are defined already
        if (!isset($config['fields'])) {
            $config['fields'] = self::$default_fields;
        }

        self::$adapters[$config['class']] = $config;
    }