switch ($protocol) { case 'REQUEST_URI':
$routePath =
$this->
parseRequestURI();
break;
case 'QUERY_STRING':
$routePath =
$this->
parseQueryString();
break;
case 'PATH_INFO':
default:
$routePath =
$this->superglobals->
server($protocol) ??
$this->
parseRequestURI();
break;
} return ($routePath === '/' ||
$routePath === ''
) ? '/' :
ltrim($routePath, '/'
);
} /**
* Will parse the REQUEST_URI and automatically detect the URI from it,
* fixing the query string if necessary.
*
* This method updates superglobal $_SERVER and $_GET.
*
* @return string The route path (before normalization).
*/