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}"; }