@param array $config

@return bool
18783
private function hasDependencies(array $config)
    {
        if (isset($config['require']) && $this->hasUserlandDependency($config['require'])) {
            return true;
        }

        if (isset($config['require-dev']) && $this->hasUserlandDependency($config['require-dev'])) {
            return true;
        }

        return false;
    }
1329193
public function setConfig($config = [])
    {
        if (!empty($config) && is_array($config)) {
            $this->config = $config;
        } else {
            $this->config = NULL;
        }
        $this->debug->debug(__FUNCTION__, '$this->config: ' . json_encode($this->config));

        return $this;
    }
434524
protected function checkConfig(array $config): void
    {
        foreach (['host', 'username', 'password', 'database', 'persistent'] as $key) {
            if (!isset($config[$key])) {
                $class = get_class($this);
                throw new ConfigException("Missing configuration key={$key} in {$class}");
            }
        }
    }
660668
public function connect( array $config )
	{
		$options = $this->getOptions( $config );

		$dsn = array_get( $config, 'dsn' );

		return $this->createConnection( $dsn, $config, $options );
	}
564900
protected function formatConfigsTable(array $config)
    {
        $configRows = [];

        foreach ($config as $setting => $value) {
            $configRows[] = compact('setting', 'value');
        }

        $this->table(['Setting', 'Value'], $configRows);
    }
1291547
public function connect(array $config)
    {
        $options = $this->getOptions($config);

        return $this->createConnection($this->getDsn($config), $config, $options);
    }
918499
static public function setConfig(array $config)
    {
        foreach ($config as $k => $v) {
            self::$_config[$k] = $v;
        }
    }
151246
private function validate(array $config = [])
    {
        $customfields = [];
        foreach ($config as $classname => $customfield) {
            if (!class_exists($classname)) {
                continue;
            }
            array_push($customfields, $customfield);
        }
        return !empty($customfields);
    }
136957
public function loadFromArray(array $config)
    {
        if (isset($config['domains'])) {
            $this->loadDomainConfiguration($config);
        }

        if (isset($config['general'])) {
            $general = $config['general'];
            $generalConfig = $this->getParsedConfig(
                $general,
                $this->config,
                $this->yamlConfigMap,
                []
            );
            $this->setCache(CacheFactory::get($generalConfig['cacheType'], $generalConfig['cacheOptions']));
            unset($generalConfig['cacheType']);
            unset($generalConfig['cacheOptions']);
            $this->setParsedConfig($generalConfig);
        }

        return $this;
    }
89662
protected function isParsedConfigValid(array $config)
    {
        $inConfig = count(array_intersect_key(array_flip($this->required), $config));

        return $inConfig === count($this->required);
    }
1038107
public function check(array $config): bool
    {
        $this->extensions = Collection::make(Arr::get($config, 'extensions', []));
        if (Arr::get($config, 'include_composer_extensions', false)) {
            $this->extensions = $this->extensions->merge($this->getExtensionsRequiredInComposerFile());
            $this->extensions = $this->extensions->unique();
        }
        $this->extensions = $this->extensions->reject(function ($ext) {
            return extension_loaded($ext);
        });

        return $this->extensions->isEmpty();
    }
1146158
public function check(array $config): bool
    {
        if (interface_exists(\Dotenv\Environment\FactoryInterface::class)) {
            $examples = Dotenv::create(base_path(), '.env.example');
            $actual = Dotenv::create(base_path(), '.env');
        } else {
            $examples = new Dotenv(base_path(), '.env.example');
            $actual = new Dotenv(base_path(), '.env');
        }

        $examples->safeLoad();
        $actual->safeLoad();

        $this->envVariables = Collection::make($actual->getEnvironmentVariableNames())
            ->diff($examples->getEnvironmentVariableNames());

        return $this->envVariables->isEmpty();
    }
1206294
private function convert(array $config)
    {
        foreach ($config as $index => $data) {
            if (is_array($data)) {
                $config[$index] = new Config($data);
            }
        }

        return $config;
    }
464831
public function client(array $config)
    {
        $key = $this->getClientKey($config);

        if (isset($this->clients[$key])) {
            return $this->clients[$key];
        }

        return $this->clients[$key] = $this->createClient($config);
    }
372486
public function setConfig(array $config)
    {
        $this->config = array_merge($this->config, $config);

        if ($this->config[ 'responsive' ]) {
            $this->responsive();
        }

        return $this;
    }
469162
final public static function setConfigDefault(array $config = [])
    {
        $calledClass = get_called_class();

        if (!isset(self::$loadedConfigSet[$calledClass])) {
            static::$config = $config;
        } else {
            self::$loadedConfigSet[$calledClass] = array_merge(self::$configDefault, $config);
        }

        return true;
    }
865711
public function connect(array $config)
    {
        $auth = $this->getAuth($config);
        $client = $this->getClient($auth);

        return $this->getAdapter($client);
    }