urimanage / urimanage
There is no license information available for the latest version (0.2.0) of this package.
PSR-7 compliant URI manager to parse, modify and format
0.2.0
2023-06-02 13:55 UTC
Requires
- php: >=8.0
- psr/http-message: ^1.0
Requires (Dev)
- php-http/psr7-integration-tests: ^1.2
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.0
- vimeo/psalm: ^5.4
This package is auto-updated.
Last update: 2024-05-01 00:11:53 UTC
README
A library to parse, format and modify URIs following the PSR-7 URI interface, with URL encoding according to RFC 3986.
Installation
Install via composer:
composer require urimanage/urimanage
Simple Usage
$uri = new \UriManage\Uri('https://github.com/filecage/urimanage'); echo $uri->getScheme(); // https echo $uri->getHost(); // github.com echo $uri->getPath(); // /filecage/urimanage echo $uri->isAbsolute(); // true
Full API Reference
For a full reference of all available methods supported by PSR-7, please see here.
Additional methods
Uri::withPathAdded(string $path) : Uri
adds a path segment to the URIUri::isAbsolute() : bool
whether the URI is absolute (has scheme or authority) or notUri::getOriginalUri() : ?string
returns the original URI before any modifications