Please consider using the the latest stable version for any production code.

Overview

Author Source Code Latest Stable Version Software License
Build Total Downloads

This package contains concrete objects to ease creating and manipulating URI objects represented as immutable value objects.

The following URI objects are defined (order alphabetically):

  • Http : represents an URI object implementing PSR-7 UriInterface
  • URI : represents a generic RFC3986 URI object

To ease URI objects creation and manipulation, the following helper classes are added (order alphabetically):

  • the UriInfo : retrieves RFC3986 related info from an URI object;
  • the UriResolver : resolves or relativizes an URI against a base URI;
  • the UriString : parses or builds an URI string into or from its components;
  • the UriTemplate : expands an URI template string into an URI object;

System Requirements

You need PHP >= 7.2 but the latest stable version of PHP is recommended.

In order to handle IDN host you are required to also install the intl extension otherwise an exception will be thrown when attempting to validate such host.

In order to create Data URI from a filepath, since version 6.2, you are required to also install the fileinfo extension otherwise an exception will be thrown.

Installation

$ composer require league/uri:^6.0

Dependencies