ml/iri

IRI handling for PHP

Maintainers

👁 markus

Package info

github.com/lanthaler/IRI

Homepage

pkg:composer/ml/iri

Statistics

Installs: 7 047 735

Dependents: 4

Suggesters: 0

Stars: 26

Open Issues: 2

1.1.4 2014-01-21 13:43 UTC

Requires

  • php: >=5.3.0
  • lib-pcre: >=4.0

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT cbd44fa913e00ea624241b38cefaa99da8d71341

urliriuriURN

This package is auto-updated.

Last update: 2026-06-17 00:19:42 UTC


README

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
👁 Code Coverage

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.