The library is a meta package which provides simple and intuitive classes to parse, validate and manipulate URIs and their components in PHP.
- PHP >= 7.0.13 but the latest stable version of PHP is recommended;
The package is a metapackage that aggregates all components related to processing and manipulating URI in PHP; in most cases, you will want a subset, and these may be installed separately.
The following components are part of the metapackage:
- League Uri Parser
- League Uri Schemes
- League Uri Components
- League Uri Manipulations
- League Uri Hostname Parser since version 5.2 in replacement of PHP Domain Parser version 3.0
The primary use case for installing the entire suite is when upgrading from a version 4 release.
If you decide you still want to install the entire suite use Composer. This can be done by running the following command on a composer installed box:
$ composer require league/uri
Most modern frameworks will include Composer out of the box, but ensure the following file is included:
<?php // Include the Composer autoloader require 'vendor/autoload.php';