src/Url.php
function buildRelative(): string
    {
        $output = '';

        // path
        $output .= $this->path;

        // query
        if ($this->query) {
            $output .= '?';
            $output .= $this->getQueryString();
        }

        // fragment
        if ($this->fragment !== null) {
            $output .= '#';
            $output .= $this->fragment;
        }

        return $output;
    }
function buildRelative(): string
    {
        $output = '';

        // path
        $output .= $this->path;

        // query
        if ($this->query) {
            $output .= '?';
            $output .= $this->getQueryString();
        }

        // fragment
        if ($this->fragment !== null) {
            $output .= '#';
            $output .= $this->fragment;
        }

        return $output;
    }
function buildRelative ( ) : string { $ output = '' ; // path $ output .= $ this -> path ; // query if ( $ this -> query ) { $ output .= '?' ; $ output .= $ this -> getQueryString ( ) ; } // fragment if ( $ this -> fragment !== null ) { $ output .= '#' ; $ output .= $ this -> fragment ; } return $ output ; }
Build a relative URL
Build a relative URL