URI manipulation Library for URIs (RFC3986 URL, URN, Windows path, relative path or file)
composer require peterpostmann/uri
If you dont want to use composer use the files as described in the sub-projects and include them into your project.
use peterpostmann\uri;
// parse_uri
array uri\parse_uri ( string uri [, int $component = -2 [, bool $convertUrlToUrn = null ]] )
// resolve_uri
string uri\resolve_uri ( string basePath, string newPath )
string uri\build_uri ( array components )
string uri\convert_url2urn ( string uri, bool convertUrlToUrn = null )
// fileuri
string uri\fileuri ( string path [, string basePath] )
The MIT License (MIT). Please see License File for more information.