Configure NonDB

@param mixed $config
@param string $val

@return self
508794
public function config($config, $val = ""){

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

            return $this;

        }
149412
public function setConfig(Config $config)
    {
        parent::setConfig($config);

        $this->command->setConfig($config);

        return $this;
    }
297076
public static function setOption($key, $val)
    {
        self::init();
        return self::$instance->setOption($key, $val);
    }
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;
    }
563414
public static function configure($config)
    {
        if (is_null(static::$instance)) {
            static::$instance = new self();

            static::$name = $config['default'];

            static::$config = $config;
        }

        return static::$instance;
    }
469315
public function setConfig($config)
    {
        if (!is_array($config) && !$config instanceof ArrayAccess) {
            throw new InvalidArgumentException('Config has to be array or ArrayAccess');
        }
        $this->config = $config;

        return $this;
    }
1116317
public function loadConfiguration($data)
    {
        parent::loadConfiguration($data);

        JFactory::$config = $this->config;

        return $this;
    }
944932
public function config($key, $val = null, $default = null)
    {
        if ($val == null) {
            return Config::get($key, $default);
        } else {
            Config::set($key, $val);
        }
    }
848823
public function connect($config)
    {
        $this->connection = Db::connect($config);
        $this->setBuilder();
        return $this;
    }
68207
protected function configure(array $config = [])
    {
        foreach ($config as $key => $value) {
            $method = 'set' . $key;
            if (method_exists($this, $method)) {
                $this->$method($value);
            }
        }
    }
1297454
public function set($name, $val)
    {
        $var = &$this->nestedValueRef($name, $this->data);

        // Mark changed
        if ($var !== $val) {
            $var = $val;
            $this->markChanged($name);
        }
        return $this;
    }
233617
public function setConfigs($config)
    {
        if (is_array($config) === false && $config instanceof \Traversable === false) {
            throw new \InvalidArgumentException(
                'Expected an array or Traversable; received: ' .
                (is_object($config) === true ? get_class($config) : gettype($config))
            );
        }
        foreach ($config as $name => $value) {
            $this->setConfig($name, $value);
        }
        return $this;
    }
363248
public function createFromArray($config)
    {
        foreach ($config as $property => $value) {
            $this->{$property} = $value;
        }

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

        return $this;
    }
700600
public function set($key, $val = null)
    {
        if (is_array($key)) {
            $this->locals = array_merge($this->locals->all(), $key);
        } else {
            $this->locals[$key] = $val;
        }
        return $this;
    }
747501
public function set($config = [])
    {
        if (!is_array($config)) {
            throw new ConfigException('Connection must be an array');
        }

        self::$config = $config;

        $defaultConnection = is_null($this->default) ? 'db' : $this->default;

        if (!is_null($defaultConnection)) {
            $this->setDefaultConnection($config[$defaultConnection]);
        }
    }
1164212
public function setConfig($aConfig)
    {
        foreach ($aConfig as $sKey => $mValue) {
            if (property_exists($this, $sKey)) {
                $this->{$sKey} = $mValue;
            } else {
                $this->oSettings->{$sKey} = $mValue;
            }
        }

        return $this;
    }