Configure other drivers.

@param array $default

@return void
553625
protected function configureDrivers(array $default = [])
    {
        $config = array_merge([
            'CACHE_DRIVER'   => null,
            'SESSION_DRIVER' => null,
            'QUEUE_DRIVER'   => null,
        ], $default);

        // Format the settings ready to display them in the table.
        $this->formatConfigsTable($config);

        $config['CACHE_DRIVER'] = $this->choice('Which cache driver do you want to use?', [
            'apc'       => 'APC(u)',
            'array'     => 'Array',
            'database'  => 'Database',
            'file'      => 'File',
            'memcached' => 'Memcached',
            'redis'     => 'Redis',
        ], $config['CACHE_DRIVER']);

        // We need to configure Redis.
        if ($config['CACHE_DRIVER'] === 'redis') {
            $this->configureRedis();
        }

        $config['SESSION_DRIVER'] = $this->choice('Which session driver do you want to use?', [
            'apc'       => 'APC(u)',
            'array'     => 'Array',
            'database'  => 'Database',
            'file'      => 'File',
            'memcached' => 'Memcached',
            'redis'     => 'Redis',
        ], $config['SESSION_DRIVER']);

        // We need to configure Redis.
        if ($config['SESSION_DRIVER'] === 'redis') {
            $this->configureRedis();
        }

        $config['QUEUE_DRIVER'] = $this->choice('Which queue driver do you want to use?', [
            'null'       => 'None',
            'sync'       => 'Synchronous',
            'database'   => 'Database',
            'beanstalkd' => 'Beanstalk',
            'sqs'        => 'Amazon SQS',
            'redis'      => 'Redis',
        ], $config['QUEUE_DRIVER']);

        // We need to configure Redis, but only if the cache driver wasn't redis.
        if ($config['QUEUE_DRIVER'] === 'redis' && ($config['SESSION_DRIVER'] !== 'redis' || $config['CACHE_DRIVER'] !== 'redis')) {
            $this->configureRedis();
        }

        // Format the settings ready to display them in the table.
        $this->formatConfigsTable($config);

        if (!$this->confirm('Are these settings correct?')) {
            return $this->configureDrivers($config);
        }

        foreach ($config as $setting => $value) {
            $this->writeEnv($setting, $value);
        }
    }
711409
public function setDefaults(array $defaults)
    {
        foreach ($defaults as $option => $value) {
            $this->setDefault($option, $value);
        }

        return $this;
    }
1200981
public function configDefault($key, $default = null)
    {
        $value = $this->config($key);
        if ($value === null) {
            $this->config($key, $default);
        }
    }
870346
protected function configure(array $config)
	{
		if (isset($config['parsers']))
		{
			$this->registerParsers($config['parsers']);
		}

		if (isset($config['cache']))
		{
			$this->cachePath = rtrim('cache', '\\/').DIRECTORY_SEPARATOR;
		}

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

		if (isset($config['view_folder']))
		{
			$this->setViewFolder($config['view_folder']);
		}

		if (isset($config['whitelist']))
		{
			$this->whitelist($config['whitelist']);
		}
	}
208030
public function getDriverConfig(?string $key = null, $default = null)
    {
        return Arr::get($this->config, $key, $default);
    }
289086
public function setDefault($default) {
        // Check, warn and auto-fix '' (empty) defaults for CHAR NOT NULL columns, changing them
        // to NULL so XMLDB will apply the proper default
        if ($this->type == XMLDB_TYPE_CHAR && $this->notnull && $default === '') {
            $this->errormsg = 'XMLDB has detected one CHAR NOT NULL column (' . $this->name . ") with '' (empty string) as DEFAULT value. This type of columns must have one meaningful DEFAULT declared or none (NULL). XMLDB have fixed it automatically changing it to none (NULL). The process will continue ok and proper defaults will be created accordingly with each DB requirements. Please fix it in source (XML and/or upgrade script) to avoid this message to be displayed.";
            $this->debug($this->errormsg);
            $default = null;
        }
        // Check, warn and autofix TEXT|BINARY columns having a default clause (only null is allowed)
        if (($this->type == XMLDB_TYPE_TEXT || $this->type == XMLDB_TYPE_BINARY) && $default !== null) {
            $this->errormsg = 'XMLDB has detected one TEXT/BINARY column (' . $this->name . ") with some DEFAULT defined. This type of columns cannot have any default value. Please fix it in source (XML and/or upgrade script) to avoid this message to be displayed.";
            $this->debug($this->errormsg);
            $default = null;
        }
        $this->default = $default;
    }
40316
protected function setupDriverConfig(string $driver): ?array
    {
        if (isset($this->config[$driver])) {
            return null;
        }

        if (\is_null($config = Arr::pull($this->config, "drivers.{$driver}"))) {
            return null;
        }

        $connection = $this->config['connection'] ?? null;

        if (! \is_null($connection) && $this->driverExcludedByOptions($driver, $connection['options'])) {
            $connection = null;
        }

        return $this->config[$driver] = \array_merge($config, ['connection' => $connection]);
    }
704379
public function setDefault($name)
    {
        $name = strtolower($name);

        if (!isset($this->drivers[$name])) {
            throw new InvalidArgumentException(
                "Unregistered cache driver name '$name'"
            );
        }

        $this->default = $name;

        return $this;
    }
228388
protected function configure()
    {
        $this->setDescription($this->shortDesc);

        foreach($this->paramsArray as $nameParam => $arrayOptions){
            if($arrayOptions['optional']){
                $this->addOption($nameParam, null, InputOption::VALUE_OPTIONAL, $arrayOptions['comment'], null);
            }
            else {
                $this->addOption($nameParam, null, InputOption::VALUE_REQUIRED, $arrayOptions['comment'], null);
            } 
        }
    }
213531
public function addDefaults(array $defaults): self
    {
        // TODO : faire un assert que $name est bien une string sinon lever une exception !!!!
        foreach ($defaults as $name => $default) {
            $this->defaults[$name] = $default;
        }

        return $this;
    }
662927
public function setDefaults(array $defaults): self
    {
        foreach ((array)$defaults as $key => $value) {
            if (isset($this->defaults[$key])) {
                $this->defaults[$key] = $value;
            } else {
                throw new Exception('Invalid route default', Exception::HTTP_INTERNAL_SERVER_ERROR);
            }
        }

        return $this;
    }
301389
public function setDefaults(array $options, bool $override = FALSE): void
    {
        $this->defaults = $options +
            ($override ? [] : [
                'path'     => null,
                'maxSize'  => self::DEFAULT_MAX_SIZE,
                'rotation' => 0,
                'rights'    => null,
            ]);
    }
585224
public function setDefault($key, $value)
    {
        if ($this->saveDefaults) {
            if (! $this->exists($key)) {
                $this->set($key, $value);
            } elseif (is_array($value)) {
                $this[$key]->defaults = $value;
            }
        } else {
            if (! isset($this->defaultData[$key])) {
                $this->defaultData[$key] = $value;
            } elseif (is_array($value)) {
                $this[$key]->defaults = $value;
            }
        }
    }
609722
public function setDefault($default)
    {
        $default = trim($default);

        if (in_array((string)$default, static::$defaultGravatars)) {
            $this->default = (string)$default;
        } elseif (strpos($default, 'http') !== false && filter_var($default, FILTER_VALIDATE_URL)) {
            $this->default = urlencode($default);
        }

        return $this;
    }
234025
private function setDefaultConfig()
    {
        $defaults = $this->configRepo->get('laravelPnotify');

        foreach($defaults as $key => $value){
            $this->config[$key] = $value;
        }
    }
515350
public function setDefault($default)
    {
        switch ($this->type) {
            case self::TYPE_STRING:
                if (!\is_string($default)) {
                    throw new \InvalidArgumentException('Default parameter is not a string');
                }

                break;
            case self::TYPE_NUMBER:
                if (!\is_numeric($default)) {
                    throw new \InvalidArgumentException('Default parameter is not a number');
                }

                break;
            case self::TYPE_INTEGER:
                if (!\is_numeric($default) || (int) $default != $default) {
                    throw new \InvalidArgumentException('Default parameter is not an integer');
                }

                break;
            case self::TYPE_DATE:
                if (!$default instanceof \DateTimeImmutable) {
                    throw new \InvalidArgumentException('Default parameter is not a dateTime object');
                }

                break;
            case self::TYPE_BOOLEAN:
                if (!\is_bool($default)) {
                    throw new \InvalidArgumentException('Default parameter is not a boolean');
                }

                break;
            case self::TYPE_FILE:
                throw new \InvalidArgumentException('A default value cannot be set for a file');

                break;
        }

        $this->default = $default;
    }
603907
protected function setSettings(array $settings): void
    {
        $this->server->set(array_merge($this->defaultSettings, $this->settings, $settings));
    }