innmind/url-resolver

Library to resolve relative urls to absolute ones

5.1.0 2023-09-16 15:03 UTC

This package is auto-updated.

Last update: 2024-12-16 17:34:21 UTC


README

Build Status codecov Type Coverage

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