Bart\Curl::buildFullUri PHP Method

buildFullUri() private method

build the full URI request
private buildFullUri ( string $path, string[] $getVars ) : string
$path string the path portion of the URI provided with this request
$getVars string[] array of GET params
return string full hostUri including GET params
    private function buildFullUri($path, $getVars)
    {
        $fullPath = $this->buildFullPath($path);
        if (!$getVars) {
            return $fullPath;
        }
        $query = http_build_query($getVars);
        // does the URI have existing query params?
        if (strpos($fullPath, '?') !== false) {
            return $fullPath . "&{$query}";
        }
        // Default; the path is just the path with no params
        return $fullPath . "?{$query}";
    }