code: public function URL($path = '', $current_url = null)
      {
          $url = new URL($this->url);
          $path = ltrim($path, '/');
          $url->set('path', $url->path . $path);
  
          if ($current_url instanceof URL)
          {
              if ($url->host === $current_url->host && $url->scheme === $current_url->scheme && $url->port === $current_url->port)
              {
                  $url->host = null;
                  $url->scheme = null;
              }
          }
          return $url;
      }
docs: Return a URL on the current VirtualHost with the path appended.
  @param string $path The path to resolve
  @param mixed $current_url The current URL. If this is provided and the
  host and scheme match, they are omitted in the result.
  @return Wedeto\HTTP\URL The resolved URL