innmind/url

Library to abstract url handling

4.3.0 2023-09-16 14:10 UTC

This package is auto-updated.

Last update: 2024-04-16 15:30:43 UTC


README

Build Status codecov Type Coverage

Url abstraction library

Installation

composer require innmind/url

Usage

use Innmind\Url\Url;

$url = Url::of('http://example.com:8080/some/dir/?limit=10');

$url->scheme(); // Scheme('http')
$url->authority()->userInformation()->user(); // User::none()
$url->authority()->userInformation()->password(); // Password::none()
$url->authority()->host(); // Host('example.com')
$url->authority()->port(); // Port(8080)
$url->path(); // Path('/some/dir/')
$url->query(); // Query('limit=10')
$url->fragment() // Fragment::none()