Sets a configuration key

@author Art <a.molcanovas@gmail.com>

@param string $k The config key
@param mixed  $v The config value

@return self
@throws InvalidArgumentException if a parameter is... invalid.
195434
public function set($k, $v) {
            switch ($k) {
                case self::LOG_LABEL:
                    $ok = $this->checkLogLabel($v);
                    $e = InvalidArgumentException::E_LABEL;
                    break;
                case self::LOG_LEVEL:
                    $ok = $this->checkLogLevel($v);
                    $e = InvalidArgumentException::E_LEVEL;
                    break;
                case self::SAVE_PATH:
                    $ok = $this->checkSavePath($v);
                    $e = InvalidArgumentException::E_PATH;
                    break;
                default:
                    $e = 0;
                    $ok = true;
            }

            if ($ok) {
                parent::set($k, $v);
            } else {
                throw new InvalidArgumentException('The ' . $k . ' setting is invalid.', $e);
            }

            return $this;
        }
1185159
public function set($key, $val = null)
    {
        if (is_array($key)) {
            $this->_setpost = array_merge($this->_setpost, $key);
        } else {
            $this->_setpost[$key] = $val;
        }
        return $this;
    }
616885
public function setConfig($key = null, $value = null)
    {
        if (is_array($key)) {
            $this->config = $key;
        } else {
            $this->config[$key] = $value;
        }

        return $this;
    }
767412
public function setConfig($key, $value = null)
	{
		\Arr::set($this->config, $key, $value);

		return $this;
	}
188631
public function setConfig($key,$value = ''){
		if(is_array($key)){
			$this->_config = array_merge($this->_config,$key);
		}
		else{
			$this->_config[$key] = $value;
		}
		$this->updateConfig();
		
		return $this;
	}
603248
public function setEn($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->en !== $v) {
            $this->en = $v;
            $this->modifiedColumns[] = CountryPeer::EN;
        }


        return $this;
    }
899005
protected function setConfig($value, $key)
    {
        $setter = 'set' . ucfirst($key);

        if (method_exists($this, $setter)) {
            $this->$setter($value);
        } elseif (property_exists($this, $key)) {
            $this->$key = $value;
        }

        return $this;
    }
444292
protected function setKey($key): self
    {
        assert(is_resource($key) === true);

        $this->closeKey();
        $this->key = $key;

        return $this;
    }
728885
public function setLngProperty($key)
    {
        if ($key === null) {
            $this->lngProperty = $key;
            return $this;
        }

        if (!is_string($key)) {
            throw new InvalidArgumentException(
                'The "lng_property" must be a string'
            );
        }

        $this->lngProperty = $key;
        return $this;
    }
1262954
public static function set(string $key, $value)
    {
        if (!in_array($key, self::$allowedKeys)) {
            throw new \InvalidArgumentException('Invalid key given');
        }

        self::$storedValues[$key] = $value;
    }
1172549
public function set($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->set($k, $v);
            }
        } else {
            $keyArray    = $this->filter(explode($this->separator, $key), 'number', true);
            $this->array = $this->recurArrayChange($this->array, $keyArray, $value);
        }
        return $this;
    }
797770
public function setConfigVariable(string $key, $value)
    {

        if ($key === '' || $key === null) {
            // if you're not strict you get this errors
            throw new ViewException('Config variable key is not allowed to be empty');
        }

        $this->setting[$key] = $value;

        return $this;
    }
222516
public function setLatProperty($key)
    {
        if ($key === null) {
            $this->latProperty = $key;
            return $this;
        }

        if (!is_string($key)) {
            throw new InvalidArgumentException(
                'The "lat_property" must be a string'
            );
        }

        $this->latProperty = $key;
        return $this;
    }
550071
public function setParam($key, $value = null)
    {
        if (!$this->hasParam($key)) {
            throw new \InvalidArgumentException(sprintf('Cannot set %s as parameter cause this key does not exist.', $key));
        }

        if (is_object($value)) {
            throw new \InvalidArgumentException('Parameter\'s value cannot be type of object.');
        }

        $currentValue = $this->getParamValue($key);
        if (
            (null !== $value && null !== $currentValue)
            && (
                gettype($value) !== gettype($currentValue)
                && (
                    !(is_string($value) || is_integer($value))
                    || !(is_string($currentValue) || is_integer($currentValue))
                )
            )
        ) {
            throw new \InvalidArgumentException(sprintf(
                'Cannot replace %s\'s value, %s expected and %s given.',
                $key,
                gettype($currentValue),
                gettype($value)
            ));
        }

        if (null === $value) {
            unset($this->_parameters[$key]);
        } else {
            $this->_parameters[$key] = ['value' => $value];
        }

        return $this->getContentInstance();
    }
435643
public function setConfigVariable($key, $value)
    {

        if (!$key) {
            return false;
        }

        $this->setting->$key = $value;

        return $this;
    }
997744
public function setCode($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->code !== $v) {
            $this->code = $v;
            $this->modifiedColumns[] = CountryPeer::CODE;
        }


        return $this;
    }
1310408
public function setConfig($key, $value = null)
    {
        $configurator = $this->getConfigurator();
        if(!is_scalar($key)){
            $configuratorClass = get_class($configurator);
            $configurator->merge(new $configuratorClass($key, true));
        }else{
            $configurator[$key] = $value;
        }

        return $this;
    }