innmind / url-resolver
Library to resolve relative urls to absolute ones
5.1.0
2023-09-16 15:03 UTC
Requires
- php: ~8.2
- innmind/immutable: ~4.0|~5.0
- innmind/url: ~4.0
Requires (Dev)
- innmind/coding-standard: ~2.0
- phpunit/phpunit: ~9.0
- vimeo/psalm: ~4.22
README
Allow to build an absolute url from a source url and a destination.
Example:
use Innmind\UrlResolver\UrlResolver; use Innmind\Url\Url; $resolve = UrlResolver::of('http', 'https'); $url = $resolve( Url::of('http://example.com/foo/'), Url::of('./bar/baz?query=string#fragment'), ); // $url resolves to http://example.com/foo/bar/baz?query=string#fragment