PHPackages                             iamfat/gini - 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. iamfat/gini

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

iamfat/gini
===========

2.3.1(1y ago)2818218[1 issues](https://github.com/iamfat/gini/issues)MITPHP

Since Apr 9Pushed 1y ago9 watchersCompare

[ Source](https://github.com/iamfat/gini)[ Packagist](https://packagist.org/packages/iamfat/gini)[ RSS](/packages/iamfat-gini/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (5)Versions (54)Used By (0)

Gini PHP Framework
==================

[](#gini-php-framework)

[![Gini Logo](raw/assets/icon/gini.png)](raw/assets/icon/gini.png)

**Gini** 是一个基于松散模块依赖的MVC PHP框架，深受Kohana, Symphony和Composer的影响。

[点击这里进入GitBook阅读具体文档](http://github.com/iamfat/gini-book/)

[可用的Gini模块](https://github.com/gini-modules)

易用的CLI
------

[](#易用的cli)

Gini 在命令行下提供了一个 `gini` 命令, 和 `composer` 与 `npm` 类似. 你能够很容易的通过少数几条命令创建CLI的应用，然后通过 `gini foo bar` 的方式调用.

面向对象
----

[](#面向对象)

Gini PHP framework 基于 PHP 5 OO. 现在难道还有 PHP 框架不是 OO 的吗?

兼容 Composer
-----------

[](#兼容-composer)

你可以通过 Composer 来加装 Gini, 也可以独立使用 Gini, 又或者在 Gini 框架中直接使用各种 Composer 第三方模块.

Those ORM
---------

[](#those-orm)

这是一个内建的 ORM 实现, 方便大家采用 OO 的方式访问数据库. Database SQL 层完全被封装成了对象。 你可以像定义类一样的方式定义你的数据库表结构。当你实例化对象并赋值属性，然后使用 `save` 方法时，系统会自动将对象的属性保存在数据表中。

同时， **Those ORM** 提供了有趣的符合自然语义的语法来完成原本枯燥的SQL实现 (实验中...)。 以下是个示例:

```
// 查询所有名字以'J'开头, 爸爸的email中存在genee的用户
$users = those('users')
    ->whose('name')->beginWith('J')
    ->andWhose('father')->isIn(
        those('users')->whose('email')->contains('genee')
    );
```

内建 JSON-RPC 和 REST 的 API 与远程调用支持
--------------------------------

[](#内建-json-rpc-和-rest-的-api-与远程调用支持)

以下是个示例:

1. JSON-RPC

```
// Client
$rpc = new \Gini\RPC('http://gini/api');
$sum = $rpc->hello->add(1, 2);

//Server
class Hello extends \Gini\Controller\API {
    public function actionAdd($a, $b) {
        return $a + $b;
    }
}
```

2. REST

```
// Client
$rest = new \Gini\REST('http://localhost/rest');
$sum = $rest->post('add', ['a'=>1, 'b'=>2]);

// Server
class Hello extends \Gini\Controller\REST {
    public function postAdd($a, $b) {
        return $a + $b;
    }
}
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance42

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 91.2% 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 ~73 days

Recently: every ~205 days

Total

53

Last Release

599d ago

Major Versions

0.6.12 → 1.0.02015-07-18

1.9.1 → 2.0.02022-06-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/724105?v=4)[Jia Huang](/maintainers/iamfat)[@iamfat](https://github.com/iamfat)

---

Top Contributors

[![iamfat](https://avatars.githubusercontent.com/u/724105?v=4)](https://github.com/iamfat "iamfat (791 commits)")[![pihizi](https://avatars.githubusercontent.com/u/3204734?v=4)](https://github.com/pihizi "pihizi (31 commits)")[![HuangStomach](https://avatars.githubusercontent.com/u/8955394?v=4)](https://github.com/HuangStomach "HuangStomach (19 commits)")[![RayYH](https://avatars.githubusercontent.com/u/41055099?v=4)](https://github.com/RayYH "RayYH (8 commits)")[![kingofpowers](https://avatars.githubusercontent.com/u/11452147?v=4)](https://github.com/kingofpowers "kingofpowers (6 commits)")[![txw-yates](https://avatars.githubusercontent.com/u/23112008?v=4)](https://github.com/txw-yates "txw-yates (4 commits)")[![LeopardDennis](https://avatars.githubusercontent.com/u/1287974?v=4)](https://github.com/LeopardDennis "LeopardDennis (3 commits)")[![leejinlin](https://avatars.githubusercontent.com/u/5549663?v=4)](https://github.com/leejinlin "leejinlin (2 commits)")[![oakfire](https://avatars.githubusercontent.com/u/2775180?v=4)](https://github.com/oakfire "oakfire (1 commits)")[![huihui2018](https://avatars.githubusercontent.com/u/30120497?v=4)](https://github.com/huihui2018 "huihui2018 (1 commits)")[![unpc](https://avatars.githubusercontent.com/u/7303533?v=4)](https://github.com/unpc "unpc (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/iamfat-gini/health.svg)

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

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[illuminate/support

The Illuminate Support package.

583107.1M34.5k](/packages/illuminate-support)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[hostnet/entity-tracker-component

Provides an event when a Tracked entity changes

16158.1k4](/packages/hostnet-entity-tracker-component)

PHPackages © 2026

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