src/Net/URL2.php
public function getURL()
    {
        // See RFC 3986, section 5.3
        $url = '';

        if ($this->_scheme !== false) {
            $url .= $this->_scheme . ':';
        }

        $url .= $this->_buildAuthorityAndPath($this->getAuthority(), $this->_path);

        if ($this->_query !== false) {
            $url .= '?' . $this->_query;
        }

        if ($this->_fragment !== false) {
            $url .= '#' . $this->_fragment;
        }

        return $url;
    }
public function getURL()
    {
        // See RFC 3986, section 5.3
        $url = '';

        if ($this->_scheme !== false) {
            $url .= $this->_scheme . ':';
        }

        $url .= $this->_buildAuthorityAndPath($this->getAuthority(), $this->_path);

        if ($this->_query !== false) {
            $url .= '?' . $this->_query;
        }

        if ($this->_fragment !== false) {
            $url .= '#' . $this->_fragment;
        }

        return $url;
    }
Returns a string representation of this URL.

@return string