PHPackages                             hectorqin/think-core - 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. [Framework](/categories/framework)
4. /
5. hectorqin/think-core

ActiveFramework[Framework](/categories/framework)

hectorqin/think-core
====================

The enhanced TP Framework based on ThinkPHP3.2

v1.0.5(5y ago)19791MITPHPPHP &gt;=7.1.0

Since Aug 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hectorqin/think-core)[ Packagist](https://packagist.org/packages/hectorqin/think-core)[ Docs](http://thinkphp.cn/)[ RSS](/packages/hectorqin-think-core/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

ThinkPHP
========

[](#thinkphp)

ThinkPHP3.2.5 修改版

修改说明
----

[](#修改说明)

- 状态配置修改为在加载扩展配置之后加载
- C方法支持三维数组设置和获取支持
- U方法新增数组参数支持
- 自动添加数据库名特性
- SLOG自动初始化支持
- 支持指定JSONP方式返回数据
- 新增ajax返回附加数据
- MySQL断线自动重连
- I方法$name参数默认值设为''，支持解析POST请求的JSON数据
- URL参数绑定支持解析POST请求的JSON数据

环境变量配置说明
--------

[](#环境变量配置说明)

- 框架会自动加载根目录下.env文件，和TP5.1一样，提供env函数访问环境变量

命名空间说明
------

[](#命名空间说明)

- 取消了类库 `.class.php` 后缀要求
- 新增根目录命名空间，即根目录为起始命名空间，如 `App\Controller` 即 `App/Controller.php` 文件

关联模型说明
------

[](#关联模型说明)

```
`Think\Model` 类新增with方法加载关联模型,支持一下用法.

```php
// 使用模型文件里面relations方法获取预定义的关联模型配置
BookModel::with(['author','comments'])->select();
BookModel::instance()->with(['author','comments'])->select();

// 直接传入关联模型配置，将与预定义关联模型合并
BookModel::with(['author'=>[
    'relation_model' => AuthorModel::class,
    'relation_table' => 'authors',
    'relation_key'   => 'id',
    'foreign_key'    => 'author_id',
    'mapping_name'   => 'author',
    'mapping_type'   => RelationModel::BELONGS_TO,
    'condition'      => [],
]])->select();

// 设置关联查询回调
BookModel::with(['author'=>function($query){
    $query->where(['name'=>'张三']);
}])->select();

// 子关联模型
BookModel::with(['author.books','comments'=>['with'=>'user']])->select();
BookModel::with(['author.books','comments'=>['with'=>['user']]])->select();

// 子关联模型动态配置
BookModel::with(['author.books' => [
    'condition' => false, // 取消默认查询条件
],'comments'])->select();

// 子关联模型查询回调
BookModel::with(['author.books' => function($query){
    $query->where(['sale_num', ['gt', 100]]);
},'comments'])->select();
```

```

建议
--

[](#建议)

- 不建议使用D方法来实例化模型，对代码提示不友好
- 尽量为每个表都创建模型

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Recently: every ~53 days

Total

6

Last Release

1898d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b8a54eac6e1f748bc947581efd89a684838353116927057f5c98937fb1888c6?d=identicon)[hectorqin](/maintainers/hectorqin)

---

Top Contributors

[![hectorqin](https://avatars.githubusercontent.com/u/14220132?v=4)](https://github.com/hectorqin "hectorqin (1 commits)")

---

Tags

frameworkormthinkphp

### Embed Badge

![Health badge](/badges/hectorqin-think-core/health.svg)

```
[![Health](https://phpackages.com/badges/hectorqin-think-core/health.svg)](https://phpackages.com/packages/hectorqin-think-core)
```

PHPackages © 2026

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