Sets a value for the key $key (and converts it to a string).

@param string $key the key of the element to set, must not be empty
@param mixed $value the value to set, may be empty

@return void
187606
protected function setAsString($key, $value)
    {
        $this->checkForNonEmptyKey($key);

        $this->set($key, (string)$value);
    }
1029495
public function set($key, $value = null)
    {
        if ($value === null) {
            $this->parameters = $key + $this->parameters;
        } else {
            $this->parameters[$key] = $value;
        }

        return $this;
    }
288625
public function setSettingsValue($key, $value)
    {
        if ($this->isKeyAllowed($key)) {
            return;
        }

        $this->fieldValues[$key] = $value;
    }
395741
public function setParam($key, $value): void
    {
        $key = (string)$key;

        if ((null === $value) && isset($this->params[$key])) {
            unset($this->params[$key]);
        } elseif (null !== $value) {
            $this->params[$key] = $value;
        }
    }
599155
public function set(string $key, $value)
    {
        if (!isset($this->data[$this->activeAssetSourceIdentifier])) {
            $this->initializeData($this->activeAssetSourceIdentifier);
        }
        $this->data[$this->activeAssetSourceIdentifier][$key] = $value;
    }
837150
public function set($key, $value)
    {
        if (is_string($key)) {
            $this->config[$key] = $value;
        } else {
            throw new ConfigException('config key must be a string');
        }
    }
1290848
public function addValue(string $key, string $value) : void
    {
        $this->map[$key] = $value;
    }
1304362
public function setString($key, $value)
    {
        if (!$this->isDisabled()) {
            $path = $this->resolvePath($key, true);
            file_put_contents($path, $value);
        }
    }
1355718
public function set($key, $value)
    {
        $setting = SettingModel::create(
            [
                'key' => $key,
                'value' => $value,
            ]
        );

        return $setting ? $value : false;
    }
1023566
public function set($key, $value = null)
    {
        try {
            $this->table()->insert(compact('key', 'value'));
        } catch (Exception $e) {
            $this->table()->where('key', '=', $key)->update(compact('value'));
        }
    }
706900
public function set($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $configKey => $configValue) {
                $this->setSingleItem($configKey, $configValue);
            }
        } else {
            $this->setSingleItem($key, $value);
        }
    }
564152
public function set($key, $value)
    {
        if ($config = $this->getConfigFor($key)) {
            if ($type = Arr::get($config, 'type')) {
                @settype($value, $type);
            }
            $this->setting->set($key, $value);
        }
    }
851871
public function offsetSet($key, $value)
    {
        $key = strtr(strtolower($key), '_', '-');

        $this->_data[$key] = $value;
    }
296896
public function set($key, $value)
    {
        $this->initSession();
        $key_name            = $this->getSessionKeyName($key);
        $_SESSION[$key_name] = $value;
    }
146318
public function set(string $key, $value = null): void
    {
        $this->offsetSet($key, $value);
    }
989400
public function set($key, $value = null)
    {
        return self::setValue($this->data, $key, $value);
    }
682144
public function setAttribute($key, $value = null)
    {
        if ($key === 'name' && stristr($value, $this->getMultiValueSuffix()) !== false) {
            $this->setMultiValue(true);
        }

        parent::setAttribute($key, $value);
    }