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