Sets a configuration option

Sets/updates config vars, creating .muse config file as needed

@museDescription  Sets the defined key/value pair and saves it into the user's configuration

@return  void
170217
public function set()
	{
		$options = $this->arguments->getOpts();

		if (empty($options))
		{
			if ($this->output->isInteractive())
			{
				$options = array();
				$option  = $this->output->getResponse('What do you want to configure [name|email|etc...] ?');

				if (is_string($option) && !empty($option))
				{
					$options[$option] = $this->output->getResponse("What do you want your {$option} to be?");
				}
				else if (empty($option))
				{
					$this->output->error("Please specify what option you want to set.");
				}
				else
				{
					$this->output->error("The {$option} option is not currently supported.");
				}
			}
			else
			{
				$this->output = $this->output->getHelpOutput();
				$this->help();
				$this->output->render();
				return;
			}
		}

		if (Config::save($options))
		{
			$this->output->addLine('Saved new configuration!', 'success');
		}
		else
		{
			$this->output->error('Failed to save configuration');
		}
	}
956786
public function updateConfigOptions()
    {
        //search the config menu for our item
        $options = $this->searchMenu($this->name);

        //override the config's options
        $this->getConfig()->setOptions($options);
    }
638575
protected function configure()
    {
        $this->setName($this->name);
        $this->setDescription($this->description);

        foreach ($this->arguments as $argument) {
            $this->getDefinition()->addArgument($argument);
        }

        foreach ($this->options as $option) {
            $this->getDefinition()->addOption($option);
        }
    }
89949
public function setCustomConfig($key, $value) {
        if ($this->searchParams->config->customConfig == null) {
            $this->searchParams->config->customConfig = array();
        }

        $this->searchParams->config->customConfig[$key] = $value;
    }
1230490
protected function configure()
    {
        $this
            ->setName($this->getName())
            ->setDescription($this->getDescription())
            ->addOption(
                'storage',
                null,
                InputOption::VALUE_OPTIONAL,
                'Environment Location Storage',
                $this->getDefaultFileName()
            );
    }
311863
async def set_config(self, config):
        
        config_facade = client.ModelConfigFacade.from_connection(
            self.connection()
        )
        for key, value in config.items():
            if isinstance(value, ConfigValue):
                config[key] = value.value
        await config_facade.ModelSet(config)
316342
protected function configure()
    {
        $this
            ->setName('detect')
            ->setDefinition(
                [
                    new InputArgument('path', InputArgument::OPTIONAL, 'path of the project', null),
                    new InputOption(
                        'config-file',
                        'c',
                        InputOption::VALUE_REQUIRED,
                        'File path of the configuration file'
                    ),
                    new InputOption(
                        'format',
                        'f',
                        InputOption::VALUE_REQUIRED,
                        sprintf('Output format (%s)', implode(', ', $this->formats)),
                        $this->formats[0]
                    ),
                ]
            )
            ->setDescription('Detect coupling rules')
            ->setHelp($this->loadHelpContent());
    }
564152
public function set($key, $value)
    {
        if ($config = $this->getConfigFor($key)) {
            if ($type = Arr::get($config, 'type')) {
                @settype($value, $type);
            }
            $this->setting->set($key, $value);
        }
    }
1072239
protected function configure()
    {
        $this
            ->addOption(
                'target',
                't',
                InputOption::VALUE_OPTIONAL,
                'target location for output',
                'build'
            )
            ->addOption(
                'input-format',
                'i',
                InputOption::VALUE_OPTIONAL,
                'which input format does the documentation sources have?',
                'rst'
            )
            ->addOption(
                'title',
                null,
                InputOption::VALUE_OPTIONAL,
                'The title of this document',
                'Scrybe'
            )
            ->addOption(
                'template',
                null,
                InputOption::VALUE_OPTIONAL,
                'which template should be used to generate the documentation?',
                'default'
            )
            ->addArgument(
                'source',
                InputArgument::IS_ARRAY | InputArgument::REQUIRED,
                'One or more files or directories to fetch files from'
            );

        $this->setHelp(
            <<<DESCRIPTION
Generates reference documentation as {$this->output_format}.

You can define the type of files use as input using the <info>--input-format</info>
of <info>-i</info> option.

DESCRIPTION
        );
    }
201720
public function set($value)
    {
        $value = $this->toLowercase($value);

        $this->getConfig()->saveShopConfVar('aarr', self::STORAGE_KEY, $value);
    }
83706
protected function run()
    {
        foreach ($this->input as $key => $value) {
            $key = 'o_' . $key;
            if ($this->config->has($key)) {
                $this->config->set($key, $value);
                $this->raise(new OptionWasChanged($key, $value));
            }
        }

        $this->config->save();
    }
1283263
public function setOption($key, $value = null)
    {
        $name = $this->current ?: 'default';

        if (is_array($key)) {
            $this->configs[$name]['options'] = array_merge($this->configs[$name]['options'], $key);
        } else {
            $this->configs[$name]['options'][$key] = $value;
        }
    }
1016108
protected function _setConfig() {
		$config = [];
		$currentConfig = $this->_modelConfigSearchInfo->getConfig();
		if (!empty($this->_searchInfo) && is_array($this->_searchInfo)) {
			$config = $this->_searchInfo + $currentConfig;
		}

		if (!empty($this->AutocompleteLimit) && is_numeric($this->AutocompleteLimit)) {
			$config = Hash::merge($config, ['AutocompleteLimit' => $this->AutocompleteLimit] + $currentConfig);
		}

		if (!empty($config)) {
			Configure::write('CakeSearchInfo', $config);
		}
	}
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
214017
public static function set($key, $value) {
        if (!isset(self::$config['settings'])) {
            self::$config['settings'] = array();
        }

        self::$config['settings'][$key] = $value;
    }
648633
public function setOption($key, $value)
    {
        if (isset($this->options[$key]) && is_array($this->options[$key]) && is_array($value)) {
            $oldValues = $this->options[$key];
            $value = array_merge($oldValues, $value);
        }

        $this->options[$key] = $value;
    }
1023417
protected function setOptions()
    {
        $this->ssoServerUrl = null;
        $this->brokerName = null;
        $this->brokerSecret = null;

        if (!$this->ssoServerUrl || !$this->brokerName || !$this->brokerSecret) {
            throw new Exception('Missing configuration values.');
        }
    }