Set the given cURL option for all previously added cURL instances.

@param int $option The cURL option to set (CURLOPT_* constants)
@param mixed $value The new value for the option

@see curl_setopt
776936
public function setOpt($option, $value)
    {
        /**
         * @var Curl $instance
         */
        foreach ($this->curlInstances as $instance) {
            $instance->setOpt($option, $value);
        }
    }
491054
public function setOption(string $name, $value)
    {
        curl_setopt($this->handle, $name, $value);
        return $this;
    }
112825
public function setOption($option, $value)
    {
        $this->autoInitialize();

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

        return $this;
    }
721373
final public function curlSetOpt($opt, $value)
	{
		if (is_string($opt)) {
			$opt = 'CURLOPT_' . strtoupper($opt);
			if (defined($opt)) {
				$opt = constant($opt);
				curl_setopt($this->curl_handle, $opt, $value);
			} else {
				throw new \InvalidArgumentException(
					sprintf('%s is not a valid cURL option', func_get_arg(0)),
					500
				);
			}
		} elseif (is_int($opt)) {
			curl_setopt($this->curl_handle, $opt, $value);
		} else {
			throw new \InvalidArgumentException(
				sprintf(
					'%s expects $opt to be a string or int, %s given instead',
					__METHOD__,
					gettype($opt)
				),
				500
			);
		}
		return $this;
	}
254690
public function setOption($option, $value)
    {
        $option                 = strtolower($option);
        $this->options[$option] = $value;
        return $this;
    }
65422
public function setValue(   $value)
    {
        
     
        // Set the value of the expression and cast it function of the (defined) base type of the variable
        if ($this->attributes['baseType']){
            switch ($this->attributes['baseType']){
                case 'boolean':
                    if (is_string ($value)){
                        $this->value = (bool)($value=='true'||$value=='1'?1:0);
                    }else if (is_bool ($value)){
                        $this->value = $value;
                    }else if ($value == null){
                        $this->value = null;
                    }else{
                        throw new Exception ('taoQTI_models_classes_QTI_response_ExpressionOperator::setValue : an error occured, the value ['.$value.'] is not a well formed boolean');
                    }
                    break;
                case 'float':
                    $this->value = (float)$value;
                    break;
                case 'integer':
                    $this->value = (int)$value;
                    break;
                case 'identifier':
                case 'string':
                    $this->value = (string)$value;
                    break;
                case 'pair':
                    $this->value = taoQTI_models_classes_Matching_VariableFactory::createJSONValueFromQTIData($value, 'pair');
                    break;
                case 'directedPair':
                    $this->value = taoQTI_models_classes_Matching_VariableFactory::createJSONValueFromQTIData($value, 'directedPair');
                    break;
            }   
        }
        
    }
780294
public function setConfig($key,$value) {

    switch ($key) {
      //curl options
      case 'CURLOPT_CAINFO':
      case 'CURLOPT_SSL_VERIFYPEER':
      case 'CURLOPT_SSL_VERIFYHOST':
      case 'CURLOPT_CONNECTTIMEOUT':

      // Proxy
      case 'CURLOPT_PROXY':
      case 'CURLOPT_PROXYPORT':
      case 'CURLOPT_PROXYUSERPWD':

      // Debug
      case 'DEBUG_LOG_PATH':
      case 'DEBUG_MODE':
        $this->config[$key] = $value;
        return true;
        break;

      default:
        return false;
    }
  }
1247811
public function setOption($option, $value)
        {
            $option = strval($option);
            switch($option) {
                case self::OPTION_DEFAULT_IMAGE:
                    switch($value) {
                        case self::DEFAULT_404:
                        case self::DEFAULT_IDENTICON:
                        case self::DEFAULT_MM:
                        case self::DEFAULT_MONSTERID:
                        case self::DEFAULT_WAVATAR:
                        case self::DEFAULT_RETRO:
                            $this->options[$option] = $value;
                            break;
                        default:
                            throw new \Thin\Exception(get_class() . ": " . __METHOD__ . ": unknown default image type '{$value}'.");
                    }
                    break;
                case self::OPTION_EMAIL:
                    $this->options[$option] = strval($value);
                    break;
                case self::OPTION_RATING:
                    switch($value) {
                        case self::RATING_G:
                        case self::RATING_PG:
                        case self::RATING_R:
                        case self::RATING_X:
                            $this->options[$option] = $value;
                            break;
                        default:
                            throw new \Thin\Exception(get_class() . ": " . __METHOD__ . ": unknown rating '{$value}'.");
                    }
                    break;
                case self::OPTION_IMAGE_SIZE:
                    $this->options[$option] = intval($value);
                    break;
                case self::OPTION_HTTPS:
                    $this->options[$option] =(boolean) $value;
                    break;
                default:
                    throw new \Thin\Exception(get_class() . ": " . __METHOD__ . ": unknown option '{$option}'.");
            }

            return $this;
        }
793069
private function setOptionValue(Option $Option, $value) {
        $Option->setValue($value);
        $long = $Option->getLong();
        if (isset($this->events[$long])) {
            $Handler = $this->events[$long];
            $Handler($long, $value);
        }
    }
220701
public function setOption($option, $value)
    {
        if (null !== $this->logger) {
            $this->logger->startMethod('setOption', ['option' => $option, 'value' => $value]);
        }

        if (!$this->setOptionImpl($option, $value)) {
            $this->stopMethod();

            return false;
        }

        $this->setResultOK();
        $this->stopMethod();

        return true;
    }
596424
public function setPostFields($value) {
        if (is_array($value)) {
            return $this->setOption(CURLOPT_POSTFIELDS, http_build_query($value));
        } else {
            return $this->setOption(CURLOPT_POSTFIELDS, $value);
        }
    }
649316
public function setLdapOption($option, $value)
    {
        if (!filter_var($option, FILTER_VALIDATE_INT) && is_string($option)) {
            $option = constant(strtoupper($option));
        }
        $this->config['ldapOptions'][$option] = $value;

        return $this;
    }
1102374
public function setOption( $option, $value ) {
		if ( !is_string( $option ) ) {
			throw new InvalidArgumentException( 'Option name needs to be a string' );
		}

		$this->options[$option] = $value;
	}
620231
public function setCurlOpts($opt, $value = null)
	{
		// Verifying if is array
		if (is_array($opt)) {
			foreach ($opt as $k => $v) {
				$this->setCurlOpts($k,$v);
			}
		} else {
			$this->curlOpts[$opt] = $value;
		}
		
		return $this;
	}
973625
public function setOption($option, $value)
    {
        $this->options[$option] = $value;
        curl_setopt($this->resource, $option, $value);

        return $this;
    }
653209
public function addCurlOptions($curlOptions = array()) {
        if (is_array($curlOptions)) {
            foreach($curlOptions as $name => $val){
                $this->addCurlOption($name, $val);
            }
        }
    }