set option
@param string $key
@param mixed $value
@return static
498345
public function setOption($key, $value=null)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->setOption($k, $v);
            }
        } else {
            $this->options[$key] = $value;
            
            if ($this->storage && in_array($key, StorageInterface::AllowOptions)) {
                $this->storage->setOption($key, $value);
            }
        }
        return $this;
    }
995665
public function setOption($name, $value)
    {
        $method = 'set' . ucfirst($name);
        if (method_exists($this, $method) && $method !== __FUNCTION__) {
            return $this->$method($value);
        }

        $this->options[$name] = $value;
        return $this;
    }
181601
public function set($key, $value = null)
    {
        $key = $this->resolveAlias($key);

        $mutator = 'set' . $this->toCamelCase($key) . 'Value';

        if (is_callable([$this, $mutator])) {
            $this->$mutator($value);
        } else {
            $this->data[$key] = $value;
        }

        return $this;
    }
41420
public function setOption($option, $value = null)
    {
        if (is_array($option)) {
            $this->options += $option;
        } else {
            $this->options[$option] = $value;
        }

        return $this;
    }
861634
public function set($key, $value)
    {
        $this->checkRestriction($value);

        if (!is_null($key)) {
            $this->value[$key] = $value;
        } else {
            $this->value[] = $value;
        }

        return $this;
    }
412237
public function set($key, $value = null)
    {
        if (isset($value)) {
            $this->building[$key] = $value;
            return $this;
        }

        return new static($this->getSetCallback($key));
    }
207059
public function setOption( $key, $value )
	{
		if( isset( $this->options[$key] ) && $this->options[$key] === $value )
			return FALSE;
		$this->options[$key] = $value;
		return TRUE;
	}
946872
public function setOption($key, $value): void
    {
        $method = 'set' . Str::toCamelCase($key);
        if (method_exists($this, $method)) {
            $this->$method($value);
        } else {
            $this->options[$key] = $value;
        }
    }
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;
	}
720208
public function setOption(string $key, $value): self
    {
        $options = $this->options;
        $options[$key] = $value;
        // Try to set this, so it will throw an exception
        try {
            (new \Crypt_GPG($options));
        } catch (\PEAR_Exception $ex) {
            throw new GPGMailerException(
                'Could not set option "' . $key . '": ' . $ex->getMessage(),
                $ex->getCode(),
                $ex
            );
        }
        $this->options = $options;
        return $this;
    }
611249
public function setKey(string $value) : Setting
    {

        if ($this->data['key'] !== $value) {
            $this->data['key'] = $value;
            $this->setModified('key');
        }

        return $this;
    }
354804
public function setOption($key, $value)
    {
        if (Core\Config::isValidOptionName($key)) {
            Core\Config::s3t($this->$key, $value);
        }

        return $this;
    }
1233146
public function set( $key, $value ) {
		$this->reload_options();
		$suspend_reload         = $this->_suspend_reload;
		$prev                   = isset( $this->_options[ $key ] ) ? $this->_options[ $key ] : null;
		$this->_options[ $key ] = $value;
		if ( $prev !== $value ) {
			$this->_suspend_reload = true;
			$this->do_action( 'changed_option', $key, $value, $prev );
			$this->_suspend_reload = $suspend_reload;
		}

		return $this->save();
	}
1252193
public function set($key, $value = null)
    {
        if ($value === null) {
            $this->defaultValues = $key + $this->defaultValues;
        } else {
            $this->defaultValues[$key] = $value;
        }

        return $this;
    }
551111
public static function setOption(string $key, $value): void
    {
        static::validateOptions([$key => $value]);
        static::$options[$key] = $value;
    }
1093285
public function set($key, $value)
    {
        //argument test
        Argument::i()
            //Argument 1 must be a string
            ->test(1, 'string')
            //Argument 2 must be scalar or null
            ->test(2, 'scalar', 'null');
        
        if (is_null($value)) {
            $value = 'NULL';
        } else if (is_bool($value)) {
            $value = $value ? 'TRUE' : 'FALSE';
        }
        
        $this->set[$key] = $value;
        
        return $this;
    }
654783
public function updateWithOption($key, $option, $value)
    {
        if ($this->hasOption($key, $option)) {
            $this->container[$key][$option] = $value;
        }

        return $this;
    }