innmind / url
Library to abstract url handling
4.3.2
2024-10-26 12:14 UTC
Requires
- php: ~8.2
- innmind/immutable: ~4.15|~5.0
- league/uri-components: ~2.0
- league/uri-parser: ~1.2
Requires (Dev)
- innmind/black-box: ~5.0
- innmind/coding-standard: ~2.0
- phpunit/phpunit: ~10.2
- vimeo/psalm: ~5.26
Suggests
- innmind/black-box: For property based testing
Provides
Conflicts
- innmind/black-box: <5.0|~6.0
README
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()