PHPackages                             qingbing/yii2-route - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. qingbing/yii2-route

ActiveLibrary[HTTP &amp; Networking](/categories/http)

qingbing/yii2-route
===================

yii2实现组件:路由管理，可开启路由日志，接口访问日志

1.0.2(4y ago)02MITPHPPHP ^7.1.0

Since Nov 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/qingbing/yii2-route)[ Packagist](https://packagist.org/packages/qingbing/yii2-route)[ Docs](http://www.phpcorner.net)[ RSS](/packages/qingbing-yii2-route/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

yii2-task
=========

[](#yii2-task)

- yii2实现组件:路由管理，可开启路由日志，接口访问日志
- 必须使用 qingbing/yii2-helper 的 {{%systems}} 表(\\YiiHelper\\features\\system\\models\\Systems)

使用
==

[](#使用)

一、配置
----

[](#一配置)

### 1.1 配置控制器 web.php

[](#11-配置控制器-webphp)

```
'controllerMap' => [
    // 路由管理
    'interface'       => \YiiRoute\controllers\InterfaceController::class,
    'interface-field' => \YiiRoute\controllers\InterfaceFieldController::class,
    'route-log'       => \YiiRoute\controllers\RouteLogController::class,
]
```

### 1.2 配置路由组件启动 web.php

[](#12-配置路由组件启动-webphp)

```
'bootstrap'  => [
    'bootRoute',
],
'components' => [
    'bootRoute'      => [
        'class'                 => \YiiRoute\boots\RouteBootstrap::class,
        'openRoute'             => define_var('COM_BOOT_ROUTE_OPEN_ROUTE', true), // 开启路由记录
        'acceptNewInterface'    => define_var('COM_BOOT_ROUTE_ACCEPT_NEW_INTERFACE', true), // 记录新接口信息
        'throwIfSystemNotExist' => define_var('COM_BOOT_ROUTE_THROW_IF_SYSTEM_NOT_EXIST', true), // 不存在的系统是否抛出异常终止
    ],
],
```

### 1.3 配置组件常量 define-local.php

[](#13-配置组件常量-define-localphp)

```
// bootRoute 组件(路由接口管理)
defined('COM_BOOT_ROUTE_OPEN_ROUTE') or define('COM_BOOT_ROUTE_OPEN_ROUTE', true); // 开启路由记录
defined('COM_BOOT_ROUTE_ACCEPT_NEW_INTERFACE') or define('COM_BOOT_ROUTE_ACCEPT_NEW_INTERFACE', true); // 记录新接口信息
defined('COM_BOOT_ROUTE_THROW_IF_SYSTEM_NOT_EXIST') or define('COM_BOOT_ROUTE_THROW_IF_SYSTEM_NOT_EXIST', true); // 不存在的系统是否抛出异常终止
```

二、对外 action
-----------

[](#二对外-action)

- \\YiiRoute\\actions\\SystemOptions::class(接口系统选项)
- \\YiiRoute\\actions\\SystemTypeOptions::class(接口系统类型选项)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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.

###  Release Activity

Cadence

Every ~110 days

Total

2

Last Release

1514d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9379d2ee4885074de75faa3fa12970614186826f762df3c4aa0905dc1ff3b513?d=identicon)[qingbing](/maintainers/qingbing)

---

Top Contributors

[![qingbing](https://avatars.githubusercontent.com/u/33932784?v=4)](https://github.com/qingbing "qingbing (16 commits)")

---

Tags

phpfeatureyii2yiicomponentrouteyii2-route

### Embed Badge

![Health badge](/badges/qingbing-yii2-route/health.svg)

```
[![Health](https://phpackages.com/badges/qingbing-yii2-route/health.svg)](https://phpackages.com/packages/qingbing-yii2-route)
```

###  Alternatives

[jianyan74/yii2-websocket

yii2 websocket

346.2k1](/packages/jianyan74-yii2-websocket)[consik/yii2-websocket

Yii2 websocket server component

9275.9k2](/packages/consik-yii2-websocket)[zhuravljov/yii2-rest

Yii2 REST Client

1186.2k](/packages/zhuravljov-yii2-rest)

PHPackages © 2026

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