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

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 URI
  • Uri::isAbsolute() : bool whether the URI is absolute (has scheme or authority) or not
  • Uri::getOriginalUri() : ?string returns the original URI before any modifications