Set an option value and return if it was set.

@param string $key
@param mixed $value
@return boolean
765339
protected function setOption($key, $value)
    {
        if ($key === 'relativeSymlinks') {
            $this->relativeSymlinks = (boolean)$value;
            return true;
        }

        return parent::setOption($key, $value);
    }
573012
public function setnx(string $key, $value): bool {
		if ($value instanceof Closure) {
			$value = $value();
		}
		return $this->driver->setnx($key, static::serialize($value));
	}
937564
public static function options($key = null, $value = null)
    {
        $options = static::setup();
        if (!$key) {
            return $options;
        }
        if (!$value) {
            return $options[$key] ?? null;
        }
        static::$options[$key] = $value;

        return static::$options;
    }
403829
public function set($key, $value)
	{
		if ( !($value instanceof Option) &&
			!($value instanceof Optgroup) )
		{
			throw new \InvalidArgumentException('Only Options or Optgroups can be added to a Select.');
		}

		parent::set($key, $value);
		return $this;
	}
298356
public function setnx(string $key, string $value): bool {
		$return_value = false;
		$success      = $this->lock($key, function($handle) use ($value, &$return_value) {
			$old_value = $this->getWithLock($handle);
			if (($old_value === false) && $this->setWithLock($handle, $value, -1)) {
				return $return_value = true;
			}
			else
				return $return_value = false;
		});
		return ($success && $return_value);
	}
1232259
public function setOption($key, $value)
    {
        if (!in_array($key, array_keys($this->defaultOptions))) {
            throw InvalidOptionException::build([], ['option' => $key]);
        }

        $this->options[$key] = $value;
    }
38719
public function setnx(string $key, string $value): bool {
		return $this->driver->setnx($key, $value);
	}
435643
public function setConfigVariable($key, $value)
    {

        if (!$key) {
            return false;
        }

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

        return $this;
    }
638413
public function setOption($option, $value)
    {
        if ($this->isValidOption($option)) {
            $this->options[$option] = $value;
        }

        return $this;
    }
1125888
public function setOptions($key, $value)
    {
        if (isset($this->options[ $key ]))
            $this->options[ $key ] = $value;

        return $this;
    }
383269
public function set($key, $value)
    {
        $cont = clone $this;
        $cont->setParameter($key, $value);

        return $cont;
    }
954963
public function set($key, $value)
    {
        $array = &$this->data;
        $keys = explode(self::SEPERATOR, $key);
        $i = 1;
        foreach ($keys as $item) {
            if (is_array($array) && array_key_exists($item, $array) && !is_array($array[$item]) && $i !== count($keys)) {
                return false;
            }
            $array = &$array[$item];
            $i++;
        }
        $array = $value;
        $this->save();
        return true;
    }
1315273
public function setOption($option, $value)
    {
        if (false === is_int($option)) {
            $this->log('warning', sprintf('Unknown memcached option: `%s`.', $option));

            return false;
        }

        if (false === $this->_cache->setOption($option, $value)) {
            return $this->_onError('setOption');
        }

        return true;
    }
707265
public function set($key, $value)
    {
        $config = &$this->config;

        foreach (explode('.', $key) as $k) {
            $config = &$config[$k];
        }

        $config = $value;

        return true;
    }
1023598
public function setOption($key, $value)
    {
        //set value
        if (in_array($key, $this->defaultOptions) && $key !== CURLOPT_WRITEFUNCTION) {
            $this->setDefaultOption($key, $value);
        } else {
            $this->options[$key] = $value;
        }

        //return self
        return $this;
    }
300679
public function set($key, $value = null)
    {
        if (isset($value)) {
            return $this->array[$key] = $value;
        }

        return $this->array[] = $key;
    }
514824
public function setOption($key, $value)
    {
        if (!\array_key_exists($key, $this->options)) {
            throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key));
        }

        $this->checkDeprecatedOption($key);

        $this->options[$key] = $value;
    }