PHPackages                             wuding/magic-cube - 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. wuding/magic-cube

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

wuding/magic-cube
=================

21.2.16(5y ago)2671PHPPHP &gt;=7.0.0

Since Oct 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wuding/magic-cube)[ Packagist](https://packagist.org/packages/wuding/magic-cube)[ RSS](/packages/wuding-magic-cube/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (9)Used By (1)

MagicCube - Module &amp; Controller
===================================

[](#magiccube---module--controller)

实现过程
----

[](#实现过程)

HTTP 请求方法和请求地址转换标准化后的句柄

路由处理结果
------

[](#路由处理结果)

- 状态：0 未找到 1 成功匹配 2 方法不允许
- 方法：全转为小写
- 标识：:/@

控制器路径和方法调用
----------

[](#控制器路径和方法调用)

- 模块文件夹：是否放 module 目录里
- 方法文件夹
- 方法附加到动作名：

    ```

    ```
- 方法地图：

    ```
    $actionMaps = [
        'actionName' => [
            'get' => 'index',
            'post' => 'create',
        ],
    ];

    ```

预置动作
----

[](#预置动作)

- 未找到：\_notfound
- 缺省：\_default

解析优先级
-----

[](#解析优先级)

模块方法控制器动作modulemethodcontroleraction完全匹配module\_methodcontroleraction方法未定义modulecontroler\_action动作未定义module\_controllercontroler,\_action控制器未定义\_modulemodule,\_controllercontroler,\_action模块未定义返回类型
----

[](#返回类型)

默认推荐数组类型

控制器直接输出支持任何类型

视图渲染要看模板引擎支持了

返回状态码0正常1消息2成功3重定向4客户端错误5服务器错误6数据库错误7请求参数名错误8请求参数值错误9内部限制

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~80 days

Recently: every ~65 days

Total

7

Last Release

1915d ago

Major Versions

1.1.2 → 20.187.15582020-07-05

20.213.97 → 21.1.192021-01-19

PHP version history (2 changes)1.1.0PHP &gt;=5.4.0

21.2.16PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fbd1feb71a5d5f22f7ef5bd41bbe94e8076d948b769f0a9b835a1e8ded22b7a?d=identicon)[wuding](/maintainers/wuding)

---

Top Contributors

[![wuding](https://avatars.githubusercontent.com/u/235209?v=4)](https://github.com/wuding "wuding (55 commits)")

### Embed Badge

![Health badge](/badges/wuding-magic-cube/health.svg)

```
[![Health](https://phpackages.com/badges/wuding-magic-cube/health.svg)](https://phpackages.com/packages/wuding-magic-cube)
```

###  Alternatives

[phunkie/phunkie

Functional structures library for PHP

23036.4k7](/packages/phunkie-phunkie)[open-web-analytics/owa-php-sdk

The open source analytics framework.

213.0k](/packages/open-web-analytics-owa-php-sdk)

PHPackages © 2026

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