public function setParam($name, $value, $replace = true)
    {
        if (is_array($name)) {
            if (!isset($this->components[self::QUERY])) {
                $this->components[self::QUERY] = [];
            }
            TreeTools::setByPath($this->components[self::QUERY], $name, $value);
        } else {
            if (isset($this->components[self::QUERY][$name]) && !$replace) {
                return $this;
            }
            $this->components[self::QUERY][$name] = $value;
        }
        return $this;
    }
public function setParam($name, $value, $replace = true)
    {
        if (is_array($name)) {
            if (!isset($this->components[self::QUERY])) {
                $this->components[self::QUERY] = [];
            }
            TreeTools::setByPath($this->components[self::QUERY], $name, $value);
        } else {
            if (isset($this->components[self::QUERY][$name]) && !$replace) {
                return $this;
            }
            $this->components[self::QUERY][$name] = $value;
        }
        return $this;
    }
public function setParam ( $ name , $ value , $ replace = true ) { if ( is_array ( $ name ) ) { if ( ! isset ( $ this -> components [ self :: QUERY ] ) ) { $ this -> components [ self :: QUERY ] = [ ] ; } TreeTools :: setByPath ( $ this -> components [ self :: QUERY ] , $ name , $ value ) ; } else { if ( isset ( $ this -> components [ self :: QUERY ] [ $ name ] ) && ! $ replace ) { return $ this ; } $ this -> components [ self :: QUERY ] [ $ name ] = $ value ; } return $ this ; }
Sets a parameter in the query string. Allows an array to traverse a tree of key names.

@param string|array $name
@param mixed $value
@param bool $replace
@return Url
Sets a parameter in the query string . Allows an array to traverse a tree of key names .