src/VDB/Uri/Uri.php
public function toString()
    {
        if (null === $this->composedURI) {
            $this->composedURI = '';

            if (null !== $this->scheme) {
                $this->composedURI .= $this->scheme;
                $this->composedURI .= ':';
            }

            if (null !== $this->host) {
                $this->composedURI .= '//';
                if (null !== $this->username) {
                    $this->composedURI .= $this->username;
                    if (null !== $this->password) {
                        $this->composedURI .= ':';
                        $this->composedURI .= $this->password;
                    }
                    $this->composedURI .= '@';
                }
                $this->composedURI .= $this->host;
            }

            $this->composedURI .= $this->path;

            if (null !== $this->query) {
                $this->composedURI .= '?';
                $this->composedURI .= $this->query;
            }

            if (null !== $this->fragment) {
                $this->composedURI .= '#';
                $this->composedURI .= $this->fragment;
            }
        }
        return $this->composedURI;
    }
public function toString()
    {
        if (null === $this->composedURI) {
            $this->composedURI = '';

            if (null !== $this->scheme) {
                $this->composedURI .= $this->scheme;
                $this->composedURI .= ':';
            }

            if (null !== $this->host) {
                $this->composedURI .= '//';
                if (null !== $this->username) {
                    $this->composedURI .= $this->username;
                    if (null !== $this->password) {
                        $this->composedURI .= ':';
                        $this->composedURI .= $this->password;
                    }
                    $this->composedURI .= '@';
                }
                $this->composedURI .= $this->host;
            }

            $this->composedURI .= $this->path;

            if (null !== $this->query) {
                $this->composedURI .= '?';
                $this->composedURI .= $this->query;
            }

            if (null !== $this->fragment) {
                $this->composedURI .= '#';
                $this->composedURI .= $this->fragment;
            }
        }
        return $this->composedURI;
    }
public function toString ( ) { if ( null === $ this -> composedURI ) { $ this -> composedURI = '' ; if ( null !== $ this -> scheme ) { $ this -> composedURI .= $ this -> scheme ; $ this -> composedURI .= ':' ; } if ( null !== $ this -> host ) { $ this -> composedURI .= '//' ; if ( null !== $ this -> username ) { $ this -> composedURI .= $ this -> username ; if ( null !== $ this -> password ) { $ this -> composedURI .= ':' ; $ this -> composedURI .= $ this -> password ; } $ this -> composedURI .= '@' ; } $ this -> composedURI .= $ this -> host ; } $ this -> composedURI .= $ this -> path ; if ( null !== $ this -> query ) { $ this -> composedURI .= '?' ; $ this -> composedURI .= $ this -> query ; } if ( null !== $ this -> fragment ) { $ this -> composedURI .= '#' ; $ this -> composedURI .= $ this -> fragment ; } } return $ this -> composedURI ; }
Recomposes the components of this Uri as a string.

A string equivalent to the original input string, or to the
string computed from the original string, as appropriate, is
returned.  This can be influence bij normalization, reference resolution,
and so a string is constructed from this Uri's components according to
the rules specified in RFC 3986 paragraph 5.3

@return string The string form of this Uri

From RFC 3986 paragraph 5.3:

result = ""

if defined(scheme) then
append scheme to result;
append ":" to result;
endif;

if defined(authority) then
append "//" to result;
append authority to result;
endif;

append path to result;

if defined(query) then
append "?" to result;
append query to result;
endif;

if defined(fragment) then
append "#" to result;
append fragment to result;
endif;

return result;
Recomposes the components of this Uri as a string .