定制 sweetrdf/iri 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sweetrdf/iri

Composer 安装命令:

composer require sweetrdf/iri

包简介

IRI handling for PHP

README 文档

README

Note

This is a fork of the Original IRI class written by Markus Lanthaler. I maintain it in my spare time to keep it alive and usable on the latest PHP versions. Code is more or less maintained but not developed any further. If you wanna participate, feel free to open a pull request!

This is a simple PHP class to ease IRI handling. Currently it just supports parsing of IRIs and relative IRI resolution.

With more than 800 tests, this class is extensively tested.

Installation

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

{
    "require": {
        "sweetrdf/iri": "^1"
    }
}

or run:

composer install sweetrdf/iri

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

Compatible with original ml/iri

This library is intented to be a drop-in replacement for the original ml/iri library. However, the IRI class was adapted to be more type safe:

  • Added declare(strict_types=1); to the file
  • Added explicit type information to each class property
  • Added explicit return value types to each class method

IRI does not throw an InvalidArgumentException anymore if an invalid value was given in the constructor! In this case PHP itself will complain.

Credits

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

统计信息

  • 总下载量: 4.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固