Set options.

@param iterable $config

@return Ldap
777206
public function setOptions(? Iterable $config = null): self
    {
        if (null === $config) {
            return $this;
        }

        foreach ($config as $option => $value) {
            switch ($option) {
                case 'options':
                    $this->options = $value;

                    break;
                case 'uri':
                case 'binddn':
                case 'bindpw':
                case 'basedn':
                    $this->{$option} = (string) $value;

                    break;
                case 'tls':
                    $this->tls = (bool) $value;

                    break;
                default:
                    throw new Exception('unknown option '.$option.' given');
            }
        }

        return $this;
    }
1041946
public function config($config)
    {
        if (is_array($config)) {
            $this->config = array_merge($this->config, $config);
        } elseif (isset($this->config[$config])) {
            return $this->config[$config];
        } else {
            return;
        }
    }
943469
public function setConfig($config)
    {
        if (is_array($config)) {
            $this->config = $this->createConfig($config);
        } elseif ($config instanceof ConfigInterface) {
            $this->config = $config;
        } else {
            throw new InvalidArgumentException(
                'Configuration must be an array or a ConfigInterface object.'
            );
        }
        return $this;
    }
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
1236083
public function setConfig(array $config): EnvironmentConfigEvent
    {
        $this->config = array_replace_recursive($this->config, $config);

        return $this;
    }
1364674
public function loadConfiguration(array $config = [])
    {
        if (isset($config['login'])) {
            $this->setLogin($config['login']);
        }
        if (isset($config['password'])) {
            $this->setPassword($config['password']);
        }
        if (isset($config['dsn'])) {
            $this->setDSN($config['dsn']);
        }
        return $this;
    }
975706
public function setCollectionConfig($config)
    {
        if (empty($config) || !is_array($config)) {
            $config = [];
        }

        $this->collectionConfig = array_replace_recursive(
            $this->defaultCollectionConfig(),
            $this->parseCollectionConfig($config)
        );

        return $this;
    }
916763
public function setConfig($config)
    {
        $this->config = $config instanceof Structure ? $config : new Structure($config);

        $this->name    = $this->config['name'];
        $this->package = $this->getPackage();

        return $this;
    }
23763
public function setConfig(Config $config)
    {
        $this->config = $this->server->setConfig($config);

        return $this;
    }
215309
public function setConfiguration( models\LAN\LanConfig $lanConfig){
        $rest = $this->getService( self::API_LAN_CONFIG);
        $rest->PUT( $lanConfig);

        return $rest->getResult( models\LAN\LanConfig::class);
    }
378442
protected function mergeOptions(&$config, $options)
    {
        foreach ($config as $paramName => $paramValue) {
            if (isset($options[$paramName])) {
                if (is_array($paramValue)) {
                    $config[$paramName] =  array_merge($config[$paramName], $options[$paramName]);
                } else {
                    $config[$paramName] = $options[$paramName];
                }
            }
        }

        return $config;
    }
745903
public function setConfig($config)
    {
        if (is_string($config)) {
            // Treat the parameter as a filepath
            $this->config = $this->createConfig($config);
        } elseif (is_array($config)) {
            $this->config = $this->createConfig($config);
        } elseif ($config instanceof ConfigInterface) {
            $this->config = $config;
        } else {
            throw new InvalidArgumentException(sprintf(
                'Configset must be an associative array, a file path, or an instance of %s',
                ConfigInterface::class
            ));
        }

        return $this;
    }
1325038
public function put(array $config)
    {
        foreach ($config as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }
945210
public function setConfig(array $config)
    {
        foreach ($config as $key => $value) {
            $this->_config[$key] = $value;
        }

        return $this;
    }
1263868
public function setConfig($config)
    {
        $this->config = $config;

        $this->routes = $config['routes'];
        $this->templates = $config['templates'];
        $this->options = $config['options'];
        $this->layoutView = $config['layout'];

        return $this;
    }
229211
public function setConfig($config)
    {
        $this->config = $config;

        $this->routes = $config['routes'];
        $this->options = $config['options'];

        return $this;
    }
1171866
public function configure(array $config = [])
    {
        if (isset($config['email'])) {
            if (! is_array($config['email'])) {
                throw new InvalidArgumentException('Email configuration should be an array.');
            }
            $this->emailConfig = $config['email'];
        }

        // Check if config has defined a tempDir
        if (isset($config['tempDir']) && is_dir($config['tempDir'])) {
            $this->tempDir = $config['tempDir'];
        }

        return $this;
    }