Saves the $value as the $key.
If the value is an empty string or null, the $key will be removed from the storage.

@param $key
@param $value
@void
198522
public function setByKey($key, $value)
    {
        $storage = $this->getStorage();
        if ($value !== '' && $value !== null) {
            $storage[$key] = $value;
        } else {
            unset($storage[$key]);
        }
        $this->setStorage($storage);
    }
690131
public function set($key, $value, $save = true)
    {
        $this->load();
        NestedArrayUtil::setNestedArrayValue($this->state, explode('.', $key), $value);
        if ($save) {
            $this->save();
        }
    }
285766
public function offsetSet($key, $value)
    {
        if (Arr::accessible($this->value)) {
            $this->value[$key] = $value;
        }
    }
1206573
public function push($key, $value = null)
    {
        if (is_array($key)) {
            $this->input = array_merge($this->input, $key);
        } else {
            $this->input[$key] = $value;
        }
    }
146318
public function set(string $key, $value = null): void
    {
        $this->offsetSet($key, $value);
    }
621309
public function set( $key, $value )
	{
		$uri		= $this->getUriForKey( $key );
		$content	= serialize( $value );
		$this->data[$key]	= $value;
		FS_File_Editor::save( $uri, $content );
	}
669714
protected function setSessionData(string $key, ?string $value = null)
    {
        if (!$value) {
            unset($_SESSION['key']);
            return;
        }

        $_SESSION[$key] = $value;
    }
617272
private function set($key, $value = "")
    {
        if (property_exists($this, $key)) {
            $key = implode('', array_map('ucfirst', explode('_', $key)));
            $this->{'set' . $key}($value);
        }
    }
1253319
public function set(string $key, $value): void
    {
        Arr::set($this->items, $key, $value, true);
    }
349079
public function offsetSet($key = null, $value = null)
    {
        if(is_null($key))
            $this->attributes[] =   $value;
        else
            $this->attributes[$key] =   $value;
    }
16144
public function set($key, $value)
    {
        if (strpos($key, '.') !== false) {
            $this->setSubValue($key, $value);
        } else {
            $this->setByKey($key, $value);
        }

        $this->resetLang();
    }
608710
public function set(string $key, $value)
    {
        $value = static::format($value);
        parent::set($key, $value);
    }
323364
public function saveInCache($key, $value)
  {
    $this->deleteFromCache($key);
    $file = $this->cachePath . $this->getEncodedKey($key);
    file_put_contents($file, serialize($value), LOCK_EX);
  }
143806
public function set($key, $value) {
        $this->checkReadOnly();
        self::setFromKey($this->data, $key, $value, $this->separator);
    }
1204040
public function assign($key, $value = null){
        if(is_array($key)){
            foreach($key as $k => $v){
                $this->variables[$k] = $v;
            }
        }
        else{
            $this->variables[$key] = $value;
        }
    }
390610
public function store($key, $value)
    {
        $this->load();

        $this->config[$key] = $value;
        return true;
    }
1216590
public function set(string $key, $value = null): void
    {
        $slug = $this->splitKey($key);

        if (is_string($slug)) {
            $this[$slug] = $value;
            return;
        }

        $storage = $value;

        foreach (array_reverse($slug) as $id => $key) {
            if ($id === count($slug) - 1) {
                break;
            }

            $aux[$key] = $storage;

            $storage = $aux;
            unset($aux);
        }

        $this[$key] = $storage;
    }