A library to parse, format and modify URIs following the PSR-7 URI interface, with URL encoding according to RFC 3986.
Install via composer:
composer require urimanage/urimanage
$uri = new \UriManage\Uri('https://github.com/filecage/urimanage');
echo $uri->getScheme(); // https
echo $uri->getHost(); // github.com
echo $uri->getPath(); // /filecage/urimanage
echo $uri->isAbsolute(); // true
For a full reference of all available methods supported by PSR-7, please see here.
Uri::withPathAdded(string $path) : Uri
adds a path segment to the URIUri::isAbsolute() : bool
whether the URI is absolute (has scheme or authority) or notUri::getOriginalUri() : ?string
returns the original URI before any modifications