Set the configs.

@param array  $config
@param bool   $reformatted
@param string $name
@param array  $config

@return array
502287
private function refineConfigs($inputConfig, $reformatted, $name, $config)
    {
        // If validation inputs are available lets prepopulate the fields!
        if (!empty($inputConfig['inputs']) && isset($inputConfig['inputs'][$name])) {
            $inputConfig['populated'] = true;
            $inputConfig['objectValue'] = $inputConfig['inputs'][$name];
        } elseif (isset($inputConfig['config']['default_value'])) {
            $inputConfig['objectValue'] = $inputConfig['config']['default_value'];
        }

        if ($reformatted) {
            $inputConfig['placeholder'] = $this->inputCalibrator->cleanString($this->inputCalibrator->placeholder($config, $name));
        }

        if (!isset($config['type'])) {
            if (is_array($config)) {
                $inputConfig['inputType'] = 'string';
            } else {
                $inputConfig['inputType'] = $config;
            }
        } else {
            $inputConfig['inputType'] = $config['type'];
        }

        return $inputConfig;
    }
916042
public function delete($name, $config = []) {
        // handle config
        $options = $config + $this->_config;

        // delete from cache
        if(isset($this->cache[$name]))
            unset($this->cache[$name]);

        // create cookie
        $cookie = (new Cookie($name))
            ->withValue('')
            ->withPath($options['path'])
            ->withDomain($options['domain'])
            ->withSecure($options['secure'])
            ->withHttpOnly($options['httpOnly']);

        // send with response
        $this->ctrl->setResponse($this->ctrl->getResponse()->withExpiredCookie($cookie));
    }
562804
public function connect(array $config, string $name = 'main'): Connection
    {
        if (isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [$name] is already configured.");
        }

        $this->connections[$name] = new Connection($config);

        return $this->connections[$name];
    }
840134
public function setConfiguration(array $config = [])
	{
		# Merge config with default values
		$config = $config + $this->getDefaultConfiguration();

		# If debug mode, store config data for debug purpose
		if (!empty($config['debug'])) {
			$this->config = $config;
		}

		return $config;
	}
231214
private function setConfig($config)
    {
        $allowedConfigKeys = [
            'host',
            'port',
            'sasl_user',
            'sasl_password',
        ];

        foreach ($config as $key => $server) {
            (false === is_array($server)) ? $this->checkSimpleConfigArray($key, $allowedConfigKeys) : $this->checkMultidimensionalConfigArray($server, $allowedConfigKeys);
        }

        $this->config = $config;
    }
994673
public function setConfig(array $config)
    {
        foreach ($config as $type => $value) {
            $property = ucwords(str_replace('-', ' ', $type));
            $property = lcfirst(str_replace(' ', '', $property));

            $method = 'set' . ucfirst($property);

            if (method_exists($this, $method)) {
                $this->{$method}($value);
            } else {
                throw new \Parable\ORM\Exception(
                    "Tried to set non-existing property '{$property}' with value '{$value}' on " . get_class($this)
                );
            }
        }
        return $this;
    }
1071794
public static function setConfig(Config $config): void
    {
        if ($config->name() == 'application') {
            throw new ConfigException('Can\'t set config under \'application\' name; name \'application\' is not permitted because it shouldn\'t be possible to change those settings in runtime');
        }

        static::$configs[$config->name()] = $config;
    }
999881
private function setConfig($config)
    {
        $allowedConfigKeys = [
            'database',
            'host',
            'password',
            'port',
            'username',
        ];

        foreach (array_keys($config) as $key) {
            if (!in_array($key, $allowedConfigKeys)) {
                throw new MalformedDriverConfigException('Mongo Driver: malformed config parameters');
            }
        }

        $this->config = $config;
    }
594028
public function format(?string $format = null, array $config = []): self
    {
        if (! \is_null($format) && ! empty($format)) {
            $this->setFormat($format);

            if (! empty($config)) {
                $this->when($format, $config);
            }
        }

        return $this;
    }
469315
public function setConfig($config)
    {
        if (!is_array($config) && !$config instanceof ArrayAccess) {
            throw new InvalidArgumentException('Config has to be array or ArrayAccess');
        }
        $this->config = $config;

        return $this;
    }
577135
protected function setParsedConfig(array $config)
    {
        foreach ($config as $key => $value) {
            $setter = 'set'.ucfirst($key);
            $this->$setter($value);
        }
    }
885339
final public static function setConfig(array $newConfig, $validate = true)
    {
        self::deprecated(__METHOD__);

        if ($validate) {
            self::validateConfig($newConfig);
        }
        self::$config = array_merge(self::$config, $newConfig);
    }
1109278
private function setLaravelConfigs(array $config)
    {
        if (empty($config)) {
            return;
        }

        foreach ($config as $name => $value) {
            config([$name => $value]);
        }
    }
60792
protected function setConfig(array $config = array())
    {
        $this->config = $config;

        if (isset($config['prefix'])) {
            $this->prefix = $config['prefix'];
        }

        if (isset($config['host'])) {
            $this->host = $config['host'];
        }

        if (isset($config['port'])) {
            $this->port = $config['port'];
        }

        return $this;
    }
1309747
protected function configSplit($name, $config = 'default'): array
    {
        if (strpos($name, ':') !== false) {
            $parts = explode(':', $name, 2);

            return $parts;
        }

        return [$config, $name];
    }
1369855
public static function setAll($config)
	{
		foreach ($config as $key => $value) {
			self::set($key, $value);
		}

	}
122660
protected function loadConfiguration($name, Config $config)
    {
        $themeConfig = CompiledYamlFile::instance("themes://{$name}/{$name}" . YAML_EXT)->content();
        $config->joinDefaults("themes.{$name}", $themeConfig);
    }