Set curl session option.

@param (mixed) $option
(mixed) $value

@since 3.0.0

@return object
973625
public function setOption($option, $value)
    {
        $this->options[$option] = $value;
        curl_setopt($this->resource, $option, $value);

        return $this;
    }
1141749
public function setCoreSessionHandlerClass($value)
    {
        $this->setFieldName('session_handler_class');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1139230
public function setOption( $name, $value ) {

		$this->options[$name] = $value;

		// Internal ONOI options are not further relayed
		if ( strpos( $name, 'ONOI_HTTP_REQUEST' ) !== false ) {
			return;
		}

		curl_multi_setopt(
			$this->handle,
			$name,
			$value
		);
	}
45186
public function setOption(string $option, $value) : object
    {
        $this->options[$option] = $value;
        return $this;
    }
576055
public function setOption($name, $value)
    {
        Arr::set($this->options, $name, $value);

        return $this;
    }
1000660
function setOption( $option, $value )
    {
        if ( !in_array( $option, $this->Options ) )
        {
            // throwing an exception would make more sense, but we did not before - keep this for compat
            return false;
            //throw new Exception( "Option $option not supported" );
        }

        switch( $option )
        {
            case 'timeout':
                $this->Timeout = (int)$value;
                break;
            case 'login':
                $this->Login = $value;
                break;
            case 'password':
                $this->Password = $value;
                break;
            case 'authType':
                $this->AuthType = (int)$value;
                if ( $value != 1 )
                {
                    $this->ForceCURL = true;
                }
                break;
            case 'requestCompression':
                $this->RequestCompression = $value;
                break;
            case 'method':
                $this->Verb = strtoupper( $value );
                break;
            case 'acceptedCompression':
                $this->AcceptedCompression = $value;
                break;
            case 'proxyHost':
                $this->Proxy = $value;
                break;
            case 'proxyPort':
                $this->ProxyPort = ( (int)$value != 0 ? (int)$value : 8080 );
                break;
            case 'proxyUser':
                $this->ProxyLogin = $value;
                break;
            case 'proxyPassword':
                $this->ProxyPassword = $value;
                break;
            case 'proxyAuthType':
                $this->ProxyAuthType = (int)$value;
                if ( $value != 1 )
                {
                    $this->ForceCURL = true;
                }
                break;
            case 'forceCURL':
                $this->ForceCURL = (bool)$value;
                break;
            case 'debug':
                $this->Debug = (int)$value;
                break;
            case 'SSLVerifyHost':
                $this->SSLVerifyHost = (int)$value;
                break;
            case 'SSLVerifyPeer':
                $this->SSLVerifyPeer = (bool)$value;
                break;
            case 'SSLCAInfo':
                $this->SSLCAInfo = $value;
                break;
        }
        return true;
    }
957110
public static function set($key, $value, $options = []) {
		// store value in session
		if (!empty($options['session'])) {
			$key = array_key_convert_key($key);
			array_unshift($key, 'registry');
			array_unshift($key, 'numbers');
			\Session::set($key, $value);
		}
		array_key_set(self::$settings, $key, $value);
	}
488794
public static function set($option, $value)
    {
        if (!array_key_exists($option, self::$conf))
        {
            throw new InvalidArgumentException(sprintf('Unknown option "%s"', $option));
        }

        $expected = gettype(self::$conf[$option]);
        $actual = gettype($value);
        if ($expected != $actual)
        {
            throw new InvalidArgumentException(
                sprintf('Option "%s" has type "%s", but "%s" given',
                    $option, $expected, $actual)
            );
        }

        self::$conf[$option] = $value;
    }
776936
public function setOpt($option, $value)
    {
        /**
         * @var Curl $instance
         */
        foreach ($this->curlInstances as $instance) {
            $instance->setOpt($option, $value);
        }
    }
88637
public function set_options(array $options)
	{
		foreach ($options as $key => $val)
		{
			if (is_string($key) && ! is_numeric($key))
			{
				$key = constant('CURLOPT_' . strtoupper($key));
			}

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

		return $this;
	}
556908
public function setOption($option, $value)
    {
        if ($this->_link) {
            if (defined($option)) {
                if (@ldap_set_option($this->_link, constant($option), $value)) {
                    return true;
                } else {
                    $err = @ldap_errno($this->_link);
                    if ($err) {
                        $msg = @ldap_err2str($err);
                    } else {
                        $err = NET_LDAP2_ERROR;
                        $msg = Net_LDAP2::errorMessage($err);
                    }
                    return $this->raiseError($msg, $err);
                }
            } else {
                return $this->raiseError("Unkown Option requested");
            }
        } else {
            return $this->raiseError("Could not set LDAP option: No LDAP connection");
        }
    }
416680
public function setOption($option, $value) {
    // The only option we allow to be changed is OPT_PREFIX_KEY
    if ($option == self::OPT_PREFIX_KEY) {
      $this->options[$option] = $value;
      return true;
    }
    return false;
  }
679869
function setOption($option, $value)
    {
        $ret = true;
        if (array_key_exists($option, $this->_options)) {
            $this->_options[$option] = $value;
        } else {
            throw new InvalidArgumentException('Unknown option ' . $option);
        }
    }
247654
public function setCoreSessionName($value)
    {
        $this->setFieldName('session_name');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
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;
    }
71144
public function addCurlOption($name, $value) {
        if (stripos($name, 'CURLOPT_') === false) {
            $name = strtoupper('CURLOPT_' . $name);
        }
        $this->curlOptions[$name] = $value;
    }
37196
public function SetOption($option,$value){

		switch($option){

			case 'import_dirs':
				$this->SetImportDirs($value);
			return;

			case 'cache_dir':
				if( is_string($value) ){
					Less_Cache::SetCacheDir($value);
					Less_Cache::CheckCacheDir();
				}
			return;
		}

		Less_Parser::$options[$option] = $value;
	}