PHPackages                             dccheng/kernel - 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. dccheng/kernel

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

dccheng/kernel
==============

0.1.19(6y ago)0118MITPHPPHP &gt;=5.6

Since Aug 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/DCcheng/kernel)[ Packagist](https://packagist.org/packages/dccheng/kernel)[ RSS](/packages/dccheng-kernel/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

dccheng/kernel
==============

[](#dcchengkernel)

本扩展包主要是通过Kernel类与Container类对包类的所有类进行反向映射实现

主要用于日常常用开发，目前核心功能主要分为3部分

- Acg -- 基于Laravel5、Yii2等框架的CURD模板生成器，包含了对应表结构的表单验证
- Command -- 实现Linux及Windows下的命令执行，同时封装了openoffice、ffmpeg、mysql等应用程序常用命令
- Support -- 对日常开发的工具封装，包含Token、QRcode、Curl、Time、Validation等工具

程序安装
----

[](#程序安装)

```
composer require dccheng/kernel
```

程序初始化
-----

[](#程序初始化)

简单初始化

```
Kernel::init();
```

如果需要自定义初始化

```
Kernel::init([
     "you class alias"=>YourClass::class
     ...
]);
```

程序生成Token或者校验Token简单案例：

```
try {
    $token = Kernel::token()->create($userInfo);

    //设定请求参数，可缺省默认为Token
    Kernel::token()->param = "Token";

    //初始化token生存时间，可缺省默认为7200
    Kernel::token()->exp = 3600 * 24 * 30;

    //如果为ture校验请求的header HTTP_AUTHORIZATION属性
    //如果为false则校验$_GET或者$_POST的Token属性
    //可缺省默认为true
    Kernel::token()->isValidateHeader = false;

    if(Kernel::token()->validate()){
        echo "校验通过";
    }else{
        echo "校验不通过";
    }
} catch (Exception $exception) {
    echo $exception->getMessage();
}
```

程序调用执行系统命令： 如果是多个命令可以连续执行，另外执行命令的方法需要打开exec系统函数，同时支持不阻塞执行和自定义执行程序的目录

```
try {
    Kernel::command()->addCommand([
        DBCommand::backup($user,$password,$dbname,$filename),
        VideoCommand::screenCaptureCommand("E:/download/3.mkv","image","E:/download/",150),
        "rm -Rf filename",
        "..."
    ])->execute(false);
} catch (Exception $exception) {
    echo $exception->getMessage();
}
```

还封装了很多类的功能，这里就一一写出来了，具体使用方式自己看源码 如果有什么问题或者建议的话，随时欢迎来骚扰.....

联系方式
----

[](#联系方式)

Email :

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

2457d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9eff3128948672891ae9edb8c6fee4ec74128ff45571f6e5651c2c70f8670ee?d=identicon)[DCcheng](/maintainers/DCcheng)

---

Top Contributors

[![DCcheng](https://avatars.githubusercontent.com/u/8003067?v=4)](https://github.com/DCcheng "DCcheng (67 commits)")

### Embed Badge

![Health badge](/badges/dccheng-kernel/health.svg)

```
[![Health](https://phpackages.com/badges/dccheng-kernel/health.svg)](https://phpackages.com/packages/dccheng-kernel)
```

###  Alternatives

[panique/laravel-sass

Compiles your Sass .scss files to .css every time you run your app (in development)

73171.8k1](/packages/panique-laravel-sass)[dominicwatts/plusminusquantity

Plus and Minus quantity on product page and minicart

107.0k](/packages/dominicwatts-plusminusquantity)[6dreams/rich-model-trait

A rich replacement for your anemic getters and setters

151.4k](/packages/6dreams-rich-model-trait)

PHPackages © 2026

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