Skip to content

A PSR-7 compliant URI management library to parse, modify and format URIs

Notifications You must be signed in to change notification settings

filecage/urimanage-php

Repository files navigation

urimanage

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

About

A PSR-7 compliant URI management library to parse, modify and format URIs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages