protected function validateConfiguration(array $config) : bool
    {
        if (!is_array($config)) {
            throw new DatabaseConnectionException('The configuration is not an array.');
        }
        if (!isset($config['server'])) {
            throw new DatabaseConnectionException('The configuration does not contain a host.');
        }
        if (!isset($config['username'])) {
            throw new DatabaseConnectionException('The configuration does not contain a username.');
        }
        if (!isset($config['password'])) {
            throw new DatabaseConnectionException('The configuration does not contain a password.');
        }
        return true;
    }