Elgg\Application::setupPath PHP Method

setupPath() private method

Get the request URI and store it in $_GET['__elgg_uri']
private setupPath ( ) : string
return string e.g. "cache/123..."
    private function setupPath()
    {
        if (!isset($_GET[self::GET_PATH_KEY]) || is_array($_GET[self::GET_PATH_KEY])) {
            if (php_sapi_name() === 'cli-server') {
                $_GET[self::GET_PATH_KEY] = (string) parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
            } else {
                $_GET[self::GET_PATH_KEY] = '/';
            }
        }
        // normalize
        $_GET[self::GET_PATH_KEY] = '/' . trim($_GET[self::GET_PATH_KEY], '/');
        return $_GET[self::GET_PATH_KEY];
    }