original_string: protected function url($path = '', $query = [])
      {
          $path = $this->urlBase() . $path;
          $query = http_build_query(array_merge($this->params, $query));
  
          $url = $path;
          if (!empty($query)) {
              $url .= '?' . $query;
          }
  
          return $url;
      }
code: protected function url($path = '', $query = [])
      {
          $path = $this->urlBase() . $path;
          $query = http_build_query(array_merge($this->params, $query));
  
          $url = $path;
          if (!empty($query)) {
              $url .= '?' . $query;
          }
  
          return $url;
      }
code_tokens: protected function url ( $ path = '' , $ query = [ ] ) { $ path = $ this -> urlBase ( ) . $ path ; $ query = http_build_query ( array_merge ( $ this -> params , $ query ) ) ; $ url = $ path ; if ( ! empty ( $ query ) ) { $ url .= '?' . $ query ; } return $ url ; }
docstring: Build a relative URL for a resource.
  
  @param string $path
  @param array  $query
  
  @return string
docstring_tokens: Build a relative URL for a resource .