Set a given key / value pair or pairs
if the key doesn't exist already

@param array|int|string $keys
@param mixed            $value
173649
public function add($keys, $value = null)
    {
        if (is_array($keys)) {
            foreach ($keys as $key => $value) {
                $this->add($key, $value);
            }
        } elseif (is_null($this->get($keys))) {
            $this->set($keys, $value);
        }
    }
417366
public function set($key, $value)
    {
        $this->getSettingOrFail($key);

        $this->backend->setSetting($key, $value);
    }
1004172
public function set($dotNotationKeys, $value)
    {
        $keys = is_array($dotNotationKeys) ? $dotNotationKeys : [$dotNotationKeys => $value];

        foreach ($keys as $key => $value) {
            DotArray::set($this->items, $key, $value);
        }
    }
795739
public function offsetSet($key, $value)
    {
        if ($key === null) {
            array_push($this->storage, $value);

            return;
        }

        $this->storage[$key] = $value;
    }
511721
public function setValue($key, $value)
    {
        $this->langstrings[$key] = $value;
        $this->debug('SetValue ' . $key . ' => ' . $value);
    }
547244
protected function setData($key, $value)
    {
        $this->data[$key] = (is_array($value)) ? $value : [$value];
    }
918027
protected function setKey($key, $value)
    {
        if ($key == $this->_keyName) {
            $this->_keyValue = $value;
            $this->_key['value'] = $value;
        }
    }
436772
public function set(string $key, $value)
    {
        if (! is_array($value)) {
            $value = [$value];
        }

        parent::set($key, [
            'value' => $value,
            'originalKey' => $key
        ]);
    }
18183
public function set($key, $value)
    {
        $this->keys[$key] = true;
        $this->archive[$key] = $value;
    }
1135840
protected function setIntoArray(&$array, $keys, $value)
    {
        $k = array_shift($keys);

        if (is_scalar($array)) {
            $array = (array) $array;
        }

        if (!isset($array[$k])) {
            $array[$k] = null;
        }

        if (empty($keys)) {
            return $array[$k] = &$value;
        }

        return $this->setIntoArray($array[$k], $keys, $value);
    }
476035
public static function set(string $key, string $value): void
    {
        /* Check if initialized */
        if (!self::$initialized) {
            self::initialize();
        }

        /* Check if key exists */
        if (!self::$configs[$key]) {
            return;
        }

        /* Check if values are the same */
        if (self::$configs[$key] == $value) {
            return;
        }

        /* Write to current array */
        self::$configs[$key] = $value;

        /* Write to file */
        file_put_contents(self::$path, self::convertConfigsToFile());
    }
1081692
public function set($key, $value)
    {
        $method = 'setter' . ucfirst($key);
        if (method_exists($this, $method)) {
            $value = $this->$method($value);
        }
        $this->setRaw($key, $value);
    }
14889
public function set(array $array, $keys, $value)
    {
        $keys = $this->parseKeys($keys);

        if ($keys) {
            $key = array_shift($keys);

            // This is the last key we've shifted
            if (!$keys) {
                $array[$key] = $value;
            } else {
                // There are more keys so this should be an array
                if (!isset($array[$key]) || !is_array($array[$key])) {
                    $array[$key] = array();
                }
                $array[$key] = $this->set(
                    $array[$key], $keys, $value
                );
            }
        }

        return $array;
    }
638072
function set($key,$value=null){
        if(is_array($key)){
            self::$Config=array_merge(self::$Config,$key);
        }else{
            self::$Config[$key]=$value;
        }
    }
617272
private function set($key, $value = "")
    {
        if (property_exists($this, $key)) {
            $key = implode('', array_map('ucfirst', explode('_', $key)));
            $this->{'set' . $key}($value);
        }
    }
208802
public function setValue($key, $value) {
        $this->startSession();
        $_SESSION [$key] = $value;
        $this->sessionData = null;
        session_write_close();
    }
1320297
public function put($key, $value = null)
    {
        if (! is_array($key)) {
            $key = [$key => $value];
        }

        foreach ($key as $arrayKey => $arrayValue) {
            Arr::set($this->attributes, $arrayKey, $arrayValue);
        }
    }