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;
	}
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;
	}
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 ; }
Set an option for a cURL transfer

@param int   $opt   The CURLOPT_XXX option to set.
@param mixed $value The value to be set on option.
@return self
@see http://php.net/manual/en/function.curl-setopt.php
Set an option for a cURL transfer