Sets an option for the cURL instance.
@param string $name The cURL internal name of the option.
@param mixed $value The value to set.
@return $this Implementing fluent interface,
491054
public function setOption(string $name, $value)
    {
        curl_setopt($this->handle, $name, $value);
        return $this;
    }
517435
public function set($name, $value = null)
	{
		is_null($name) or \Arr::set($this->data, $name, $value);

		return $this;
	}
222391
public function set(string $name, $value): self
    {
        $this->type = self::TYPE_SET;
        $this->name = $name;
        $this->setValue($value, $this->type);

        return $this;
    }
220768
public function set($name, $value)
  {
    if (is_null($value)) {
      unset($this->vars[$name]);
    } else {
      $this->vars[$name] = $value;
    }

    return $this;
  }
881319
public function setOption(int $option, mixed $value)
    {
        curl_setopt($this->curl, $option, $value);
    }
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;
    }
63172
public function setOption($name, $value=null)
    {
        if (is_array($name)) {
            $this->options = array_merge($this->options, $name);
        } else {
            $this->options[$name] = $value;
        }
    }
355686
public function setOption($name, $value)
    {
        $this->options[$name] = $value;
        $this->compiled = null;

        return $this;
    }
667365
public function setOption(string $name, $value): Configurator
    {
        $this->validateName($name);
        $this->config[$name] = $value;

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

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

      unset( $this->_options[ 'data' ] );

      return $this;

   }
710722
public function setProperty($name, $value)
    {
        if (is_null($value)) {
            unset($this->_properties[$name]);
        } else {
            $this->_properties[$name] = $value;
        }
        return $this;
    }
1019333
public function setopt(string $name, mixed $value) : bool
    {
        return curl_setopt($this->ch, $name, $value);
    }
581218
final public function set(string $name, $value)
    {
        $this->container->setParameter($name, static::processValue($value, true));

        return $this;
    }
210954
public function set($name, $value) {
		\Asgard\Common\ArrayUtils::set($this->parameters, $name, $value);
		return $this;
	}
531529
public function setAttribute($name, $value)
    {
        if (empty($value)) {
            $this->node->removeAttribute($name);
        } else {
            $this->node->setAttribute($name, $value);
        }

        return $this;
    }
566365
public function setParam($name, $value=null) {
		if(is_array($name)) {
			foreach($name as $k=>$v)
				$this->setParam($k, $v);
			return $this;
		}
		$this->params[$name] = $value;
		return $this;
	}
75918
public function setOption($name, $value)
    {
        if (! in_array($name, $this->validOptions)) {
            throw new Error('Invalid option ' . $name . '. Valid options are : ' . join(', ', $this->validOptions));
        }
        // Check duplicate fields in header
        if ('header' == $name) {
            $cnt = array_count_values($value);
            $duplicates = array();
            foreach ($cnt as $f => $c) {
                if ($c > 1) {
                    $duplicates[$f] = $c;
                }
            }
            if (sizeof($duplicates) > 0) {
                $msg = 'Duplicate fields found in header : ' . join(', ', array_keys($duplicates));
                throw new Error($msg);
            }
        }
        $this->$name = $value;

        return $this;
    }