chemisus / uri
There is no license information available for the latest version (1.0) of this package.
1.0
2020-02-06 05:59 UTC
Requires
None
Requires (Dev)
- phpunit/phpunit: ^8.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-12 13:11:32 UTC
README
Install
composer require chemisus/uri
Examples
$uri = uri("http://example.com:8080/hello?name=chemisus");
echo $uri->scheme(); # http
echo $uri->host(); # example.com
echo $uri->port(); # 8080
echo $uri->authority(); # example.com:8080
echo $uri->path(); # /hello
echo $uri->query(); # name=chemisus
echo $uri; # http://example.com:8080/hello?name=chemisus
$child = $uri->with([
URI::SCHEME => 'https',
URI::PORT => null,
URI::PATH => '/hello/world'
]);
echo $child->scheme(); # https
echo $child->host(); # example.com
echo $child->port(); #
echo $child->authority(); # example.com
echo $child->path(); # /hello/world
echo $child->query(); # name=chemisus
echo $child; # https://example.com/hello/world?name=chemisus