system/Config/Services.php
public static function uri(string $uri = null, bool $getShared = true)
	{
		if ($getShared)
		{
			return static::getSharedInstance('uri', $uri);
		}

		return new URI($uri);
	}
public static function uri(string $uri = null, bool $getShared = true)
	{
		if ($getShared)
		{
			return static::getSharedInstance('uri', $uri);
		}

		return new URI($uri);
	}
The URI class provides a way to model and manipulate URIs.

@param string  $uri
@param boolean $getShared

@return \CodeIgniter\HTTP\URI