sort($parameterStrings); return implode('&', $parameterStrings); } /** * Append the given path to the given baseUri. * * <p> * This method will encode the given path but not the given baseUri. * */ public static function appendUri() { $path = array(); foreach (func_get_args() as $arg) { if ($arg !== null) { $path[] = $arg; } } if (count($path) > 1) { $last = count($path) - 1; $path[0] = rtrim($path[0], '/'); $path[$last] = ltrim($path[$last], '/'); for ($i = 1; $i < $last; ++$i) { $path[$i] = trim($path[$i], '/'); } } return implode("/", $path); } } HttpUtils::__init();