PHPackages                             ice-php/router - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ice-php/router

ActiveComposer[Utility &amp; Helpers](/categories/utility)

ice-php/router
==============

路由管理

041PHP

Since Sep 12Pushed 7y ago2 watchersCompare

[ Source](https://github.com/ice-php/router)[ Packagist](https://packagist.org/packages/ice-php/router)[ RSS](/packages/ice-php-router/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

路由管理
====

[](#路由管理)

- 初始化

    Router::init(array $mcaName, array $modules):void

    记录当前的MVC参数名称，通常是\[m,v,c\],以及全部Module名称。
- 解析

    Router::decode(string $path = ""):void

    依据配置文件router对URI地址进行解析，分析得到模块名称，控制器，动作及参数。
- 构造地址

    Router::encode(string $module = '', string $controller = "", string $action = "", array $params = \[\]):string

    或

    url(?string $module = '', ?string $controller = "", ?string $action = "", ?array $params = \[\]): string

    根据模块名称，控制器名称，动作名称及参数构造URL。
- 为一个URL地址附加一些参数

    Router::urlAppend(string $url, array $params):string

    或

    urlAppend(string $url, array $params): string
- 判断指定路径是否是需要忽略解码的路径

    Router::ignore(string $path):bool

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/148289317?v=4)[icePHP](/maintainers/icePHP)[@IcePHP](https://github.com/IcePHP)

---

Top Contributors

[![ice-php](https://avatars.githubusercontent.com/u/23303429?v=4)](https://github.com/ice-php "ice-php (8 commits)")

### Embed Badge

![Health badge](/badges/ice-php-router/health.svg)

```
[![Health](https://phpackages.com/badges/ice-php-router/health.svg)](https://phpackages.com/packages/ice-php-router)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
