src/Debug/Config.php
public function setCfg($pathOrVals, $val = null)
    {
        if (\is_array($pathOrVals)) {
            $cfg = $this->normalizeArray($pathOrVals);
        } else {
            $path = $this->normalizePath($pathOrVals);
            $cfg = $this->keyValToArray($path, $val);
        }
        $cfg = $this->setCopyValues($cfg);
        $return = $this->doSetCfg($cfg);
        if (isset($this->cfgLazy['output']['outputAs'])) {
            $lazyPlugins = array('chromeLogger','firephp','html','script','text');
            if (\is_object($this->cfgLazy['output']['outputAs']) || !\in_array($this->cfgLazy['output']['outputAs'], $lazyPlugins)) {
                // output is likely a dependency
                $outputAs = $this->cfgLazy['output']['outputAs'];
                unset($this->cfgLazy['output']['outputAs']);
                // this will autoload output, which will pull in cfgLazy...
                //   we then set outputAs
                $this->debug->output->setCfg('outputAs', $outputAs);
            }
        }
        if (\is_string($pathOrVals)) {
            $return = $this->debug->utilities->arrayPathGet($return, $path);
        }
        if ($cfg) {
            $this->debug->eventManager->publish(
                'debug.config',
                $this->debug,
                array('config'=>$cfg)
            );
        }
        return $return;
    }
public function setCfg($pathOrVals, $val = null)
    {
        if (\is_array($pathOrVals)) {
            $cfg = $this->normalizeArray($pathOrVals);
        } else {
            $path = $this->normalizePath($pathOrVals);
            $cfg = $this->keyValToArray($path, $val);
        }
        $cfg = $this->setCopyValues($cfg);
        $return = $this->doSetCfg($cfg);
        if (isset($this->cfgLazy['output']['outputAs'])) {
            $lazyPlugins = array('chromeLogger','firephp','html','script','text');
            if (\is_object($this->cfgLazy['output']['outputAs']) || !\in_array($this->cfgLazy['output']['outputAs'], $lazyPlugins)) {
                // output is likely a dependency
                $outputAs = $this->cfgLazy['output']['outputAs'];
                unset($this->cfgLazy['output']['outputAs']);
                // this will autoload output, which will pull in cfgLazy...
                //   we then set outputAs
                $this->debug->output->setCfg('outputAs', $outputAs);
            }
        }
        if (\is_string($pathOrVals)) {
            $return = $this->debug->utilities->arrayPathGet($return, $path);
        }
        if ($cfg) {
            $this->debug->eventManager->publish(
                'debug.config',
                $this->debug,
                array('config'=>$cfg)
            );
        }
        return $return;
    }
Set one or more config values

setCfg('key', 'value')
setCfg('level1.level2', 'value')
setCfg(array('k1'=>'v1', 'k2'=>'v2'))

Setting/updating 'key' will also set 'collect' and 'output'

Triggers a debug.config event that contains all changed values

@param string|array $pathOrVals key/path or cfg array
@param mixed        $val        (optional) value

@return mixed