wishthis/vendor/ml/iri/ML/IRI
2022-01-21 09:23:52 +01:00
..
Test Install github api 2022-01-21 09:23:52 +01:00
.gitignore Install github api 2022-01-21 09:23:52 +01:00
.travis.yml Install github api 2022-01-21 09:23:52 +01:00
composer.json Install github api 2022-01-21 09:23:52 +01:00
IRI.php Install github api 2022-01-21 09:23:52 +01:00
LICENSE Install github api 2022-01-21 09:23:52 +01:00
phpunit.xml.dist Install github api 2022-01-21 09:23:52 +01:00
README.md Install github api 2022-01-21 09:23:52 +01:00

IRI

This is a simple PHP class to ease IRI handling. Currently it just supports parsing of IRIs and relative IRI resolution. In the future I will extend it to support validation and normalization and perhaps also support for IRI templates.

With more than 700 tests, this class is extensively unit tested: Build Status

Installation

The easiest way to use IRI is to integrate it as a dependency in your project's composer.json file:

{
    "require": {
        "ml/iri": "1.*"
    }
}

Installing is then a matter of running composer

php composer.phar install

... and including Composer's autoloader to your project

require('vendor/autoload.php');

Of course you can also just download an archive from Github.

Credits

Most test cases come either directly from the URI specification, from Graham Klyne's, or Tim Berners-Lee's test suite.