Adds config into this object

@param   array   $config
@param   string  $environment
@return  $this
496508
public function addConfig(array $config, $environment = null)
    {
        $env = ($environment)? $environment : '_top';
        $this->values[$env] = (array_key_exists($env, $this->values))?
            array_replace_recursive($this->values[$env], $config)
            : $config
        ;
        $this->buildCache = null;
        return $this;
    }
1245811
public function config(array $config)
    {
        parent::config($config);

        if (array_key_exists('http_method', $config)) {
            $this->defaults->setHttpMethod($config['http_method']);
        }

        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;
    }
498725
public static function setupEnvironment(Config $config)
    {
        if (!defined('PSX')) {
            // define paths
            define('PSX_PATH_CACHE', $config->get('psx_path_cache'));
            define('PSX_PATH_PUBLIC', $config->get('psx_path_public'));
            define('PSX_PATH_SRC', $config->get('psx_path_src') ?: $config->get('psx_path_library'));

            /** @deprecated */
            define('PSX_PATH_LIBRARY', $config->get('psx_path_library'));

            // error handling
            if ($config['psx_debug'] === true) {
                $errorReporting = E_ALL | E_STRICT;
            } else {
                $errorReporting = 0;
            }

            error_reporting($errorReporting);
            set_error_handler('\PSX\Framework\Bootstrap::errorHandler');

            // annotation autoload
            $namespaces = $config->get('psx_annotation_autoload');
            if (!empty($namespaces) && is_array($namespaces)) {
                self::registerAnnotationLoader($namespaces);
            }

            // ini settings
            ini_set('date.timezone', $config['psx_timezone']);
            ini_set('session.use_only_cookies', '1');
            ini_set('docref_root', '');
            ini_set('html_errors', '0');

            // define in psx
            define('PSX', true);
        }
    }
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
425120
protected function applyHooks(Config $config)
    {
        $hooks = $config->get('hooks', null);

        $config->set('hooks', []);

        if (!isset($hooks) || !is_array($hooks) || !count($hooks)) {
            return $this;
        }

        foreach ($hooks as $type => $hookDefinitions) {
            if (!is_array($hookDefinitions)) {
                $hookDefinitions = [];
            }
            if (count($hookDefinitions)) {
                $hooks[$type] = [];
            }
            foreach ($hookDefinitions as $hook) {
                if (!($hook instanceof HookInterface)) {
                    if (is_string($hook) && '@' === $hook{0}) {
                        $hook = new CommandHook($hook);
                    } else {
                        throw new \RuntimeException(sprintf("Unsupported hook definition format: %s", json_encode($hook)), 412);
                    }
                }
                $hooks[$type][] = $hook;
            }
        }

        $config->set('hooks', $hooks);

        return $this;
    }
766428
public function addSubCommandConfig(SubCommandConfig $config)
    {
        // The name is dynamic, so don't store by name
        $this->subCommandConfigs[] = $config;

        $config->setParentConfig($this);

        return $this;
    }
539472
protected function buildEnvironment($config) {
		$environmentId = $config['env.id'];
		
		if (!EnvironmentProvider::hasEnvironment($environmentId))
			EnvironmentProvider::buildEnvironment($environmentId, $config['env.class']);
		
		//setup environment
		$env = EnvironmentProvider::getEnvironment($environmentId);
		$env->setConfig($config);
		return $env;
	}
1325038
public function put(array $config)
    {
        foreach ($config as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }
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;
    }
172324
function(config) {
			if (config.env && typeof config.env === "object") {
				return this.merge(this.createEnvironmentConfig(config.env), config);
			}

			return config;
		}
508794
public function config($config, $val = ""){

            if(is_array($config)){
                $this->config = array_merge($this->config, $config);
            }else{
                $this->config[$config] = $val;
            }

            return $this;

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

        return $this;
    }
557560
public function add(array $config) : self
    {
        $this->config = array_replace_recursive($this->config, $config);

        return $this;
    }
830595
public function setProfile($config)
    {
        if (!is_array($config)) {
            $config = (string)$config;
        }
        $this->_applyConfig($config);

        return $this;
    }
237295
public function configure($config)
    {
        foreach ((array)$config as $key => $value) {
            $this->setConfig($key, $value);
        }
    }
706026
protected function addFromConfig(array $config)
	{
		$bbcodeName = $config['bbcodeName'];
		$bbcode     = $config['bbcode'];
		$tag        = $config['tag'];

		// If the BBCode doesn't specify a tag name, it's the same as the BBCode
		if (!isset($bbcode->tagName))
		{
			$bbcode->tagName = $bbcodeName;
		}

		// Normalize this tag's templates
		$this->configurator->templateNormalizer->normalizeTag($tag);

		// Test whether this BBCode/tag is safe before adding it
		$this->configurator->templateChecker->checkTag($tag);

		// Add our BBCode then its tag
		$this->collection->add($bbcodeName, $bbcode);
		$this->configurator->tags->add($bbcode->tagName, $tag);

		return $bbcode;
	}