Add a param value to the URL, on index position if given and existent.

@param	mixed	Zero based position on URL path or Key name.
@param	string	Value to add.
@param	bool	Flag to encode as char-only the value.
160747
public function setParam($paramIdx=NULL, $value, $encode=FALSE) {
		
		if ($encode) {
			$value = rtrim(strtr(base64_encode(gzdeflate(json_encode($value), 9)), '+/', '-_'), '=');
		}
		
		if (!is_null($paramIdx)) {
			$this->vars[$paramIdx] = $value;
		} else {
			$this->vars[] = $value;
		}
		
	}
656390
public function setValue(string $value = null) : Element
    {
        if (!is_null($value)) {
            $tmp = preg_replace('/[^\d]/', '', $value);
            if (strlen($tmp)) {
                $value = $tmp;
                if ($value{0} != '0') {
                    $value = "0$value";
                }
            }
        }
        return parent::setValue($value);
    }
503643
public void addValue(int... value) {
        /* no-op if disabled */
        if (!enabled.get())
            return;

        for (int v : value) {
            try {
                getCurrentBucket().data.addValue(v);
            } catch (Exception e) {
                logger.error("Failed to add value: " + v, e);
            }
        }
    }
741263
public void setValue(String value) {
		try {
			this.telUrl = SipFactoryImpl.addressFactory.createTelURL(value);
		} catch (ParseException ex) {
			throw new IllegalArgumentException("Bad url string " + value);
		}
	}
1158827
void addOption(final String value) {
        Assert.checkNotNullParam("value", value);
        synchronized (options) {
            options.add(value);
        }
    }
864954
public Post param(String name, String value){
        params.put(name, value);
        return this;
    }
1159949
public KeySignParameters withValue(byte[] value) {
        if (value == null) {
            this.value = null;
        } else {
            this.value = Base64Url.encode(value);
        }
        return this;
    }
953828
public void addValue(String value) {
		contents.add(value);
		if (value.trim().length() > 0) {
			if (contents.size() == 1) {
				containsSingleString = true;
			} else {
				containsSingleString = false;
				containsMarkupText = true;
			}
		}
	}
1198356
function setUid( $value, $params=FALSE ) {
    $this->uid['value']  = $value;
    if( empty( $this->uid['value'] ))
      return;
    $this->uid['params'] = $this->_setParams( $params );
  }
706533
public void setValue(String value) {
		try {
			this.uri = SipFactoryImpl.addressFactory.createURI(value);
			if(this.uri instanceof Parameters) {
				super.setParameters(AddressImpl.getParameters((Parameters)uri));
			} else {
				super.setParameters(new ConcurrentHashMap<String, String>());
			}
		} catch (ParseException ex) {
			logger.error("Bad input arg", ex);
			throw new IllegalArgumentException("Bad input arg", ex);
		}
	}
1220605
public function offsetSet($offset, $value)
    {
        //argument 1 must be scalar, null or bool
        Argument::i()->test(1, 'scalar', 'null', 'bool');
        
        if (is_null($offset)) {
            $this->append($value);
        } else if ($offset == 'prepend') {
            $this->prepend($value);
        } else if ($offset == 'replace') {
            $this->replace($value);
        } else {
            $pathArray = $this->getArray();
            if ($offset > 0 && $offset < count($pathArray)) {
                $pathArray[$offset] = $value;
                $this->data = implode('/', $pathArray);
            }
        }
    }
1303313
public void add(final Param key, final String value) {
        if (StringUtils.isNotBlank(value)) {
            parameters.put(key, value);
        }
    }
551213
public URIBuilder addParameter(final String param, final String value) {
        if (this.queryParams == null) {
            this.queryParams = new ArrayList<NameValuePair>();
        }
        this.queryParams.add(new BasicNameValuePair(param, value));
        this.encodedQuery = null;
        this.encodedSchemeSpecificPart = null;
        return this;
    }
685087
public function setLocation($value)
    {
        switch($value) {
            case null:
                unset($this->_params['location']);
            default:
                $parameters = explode(',', $value);
                if (count($parameters) != 2) {
                    require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    throw new Zend_Gdata_App_InvalidArgumentException(
                        'You must provide 2 coordinates to the location ' .
                        'URL parameter');
                }

                foreach($parameters as $param) {
                    $temp = trim($param);
                    // strip off the optional exclamation mark for numeric check
                    if (substr($temp, -1) == '!') {
                        $temp = substr($temp, 0, -1);
                    }
                    if (!is_numeric($temp)) {
                        require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                        throw new Zend_Gdata_App_InvalidArgumentException(
                            'Value provided to location parameter must' .
                            ' be in the form of two coordinates');
                    }
                }
                $this->_params['location'] = $value;
        }
    }
282597
public function setIndexKey($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->IndexKey = $value;
    }
390819
public static function isUrl($value)
    {
        if (\strlen($value) > 0 && $value[0] == $value[1] && $value[0] == "/") {
            $value = 'http:'.$value;
        }

        return false !== \filter_var($value, FILTER_VALIDATE_URL, ['options' => ['flags' => FILTER_FLAG_PATH_REQUIRED]]);
    }
750594
public void addParam(String name, String value) {
        if (name == null) {
            throw new NullPointerException("name");
        }
        if (value == null) {
            throw new NullPointerException("value");
        }
        params.add(new Param(name, value));
    }