UrlBuilder.php
public function setQueryParam($name, $value)
    {
        if ($this->checkQuery($name)) {
            $this->editQuery($name, $value);
        } else {
            $this->addQuery($name, $value);
        }

        return $this;
    }
public function setQueryParam($name, $value)
    {
        if ($this->checkQuery($name)) {
            $this->editQuery($name, $value);
        } else {
            $this->addQuery($name, $value);
        }

        return $this;
    }
Set value of existing query parameter or create new one

@param string $name Parameter name
@param string $value Parameter value
@return $this