PHPackages                             gouuse/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gouuse/core

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

gouuse/core
===========

gouuse core files

1.2.21(8y ago)19492PHPPHP &gt;=7

Since May 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sayid/gouuse_core)[ Packagist](https://packagist.org/packages/gouuse/core)[ RSS](/packages/gouuse-core/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (12)Versions (171)Used By (0)

gouuse\_core
============

[](#gouuse_core)

使用方法：

1、第一步在composer文件中引入该包

"gouuse/core":"1.1.\*"

2、在自己项目框架中，将controller继承为

use GouuseCore\\Controllers\\Controller

3、将model继承为

use GouuseCore\\Models\\BaseModel;

4、将lib继承为

use GouuseCore\\Libraries\\Lib; 如果将自己library放入到公共包并且希望使用$this-&gt;方式调用，需要将公共包的BaseGouuse.php中的33行加上自己的library。公共类可以自定加入到lib文件夹下。 注意：自己模块的私有类库请放在自己项目的library下

5、使用helper时 使用

GouuseCore\\Helpers\\ArrayHelper

6、使用数据库日志、返回数据使用数组

在app.php中注册EventServiceProvider $app-&gt;register(GouuseCore\\Providers\\EventServiceProvider::class);

7、swoole服务管理 端口信息配置在.env文件中 vendor/bin/Swoole start | stop | reload | restart | quit 注意：Windows环境需要使用php -f vendor/gouuse/core/src/bin/Swoole start | stop | reload | restart | quit

8、自己开发的服务如果要对其他应用提供内部调用，请在Rpcs文件夹下编写自己的rpc客户端，参照memberrpc.php。使用rpc服务需要在网关层面定义要负载、API规则协议，rpc会自动拉取网关路由规则

9、阿里消息订阅服务 在.env中配置： QUEUE\_PREFIX=dev- QUEUE\_MNS\_ACCESS\_KEY= QUEUE\_MNS\_SECRET\_KEY= QUEUE\_MNS\_ENDPOINT=发送消息到消息中心： $messge\_data = \[消息体组合数组\]; $this-&gt;sendMessageCenter-&gt;sendMessageCenter($messge\_data);

发送通用订阅消息： $messge\_data = \['topic\_name' =&gt; 'user-message-center', 'message\_body' =&gt; json\_encode($messge\_data)\]; $this-&gt;sendMessageCenter-&gt;sendMessageTopic($messge\_data);

获取订阅消息： $this-&gt;MessageCenterLib-&gt;getMessageData($request);

10、通用日志方法 成功日志：$this-&gt;LogLib-&gt;info(\['param' =&gt; '提交数据', 'result' =&gt; '返回数据', 'startTime' =&gt; '开始时间戳'\]); 错语日志：$this-&gt;LogLib-&gt;log\_err(\['param' =&gt; '提交数据', 'result' =&gt; '返回数据', 'startTime' =&gt; '开始时间戳'\]);

11、CodeTool工具是自动将CodeLib.php文件的注释自动转换成数组配置文件 执行方式vendor/bin/CodeTool ，生成的文件error\_code.inc.php在resources/options/zh\_cn/目录下 注意：Windows开发环境下需要使用php -f vendor/gouuse/core/src/bin/CodeTool error\_c ode.inc.php执行

12、加密解密 使用$this-&gt;EncryptLib-&gt;encrypt() / $this-&gt;EncryptLib-&gt;decrypt()

13、生成文档 php vendor/zircote/swagger-php/bin/swagger app/Http/Controllers -o public/swagger-docs

14、rpc调用远程方法

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

170

Last Release

3185d ago

### Community

Maintainers

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

---

Top Contributors

[![aspx5](https://avatars.githubusercontent.com/u/26223984?v=4)](https://github.com/aspx5 "aspx5 (29 commits)")[![sayid](https://avatars.githubusercontent.com/u/362920?v=4)](https://github.com/sayid "sayid (15 commits)")[![wuleeaa](https://avatars.githubusercontent.com/u/32191510?v=4)](https://github.com/wuleeaa "wuleeaa (12 commits)")[![ezhufrank](https://avatars.githubusercontent.com/u/8327558?v=4)](https://github.com/ezhufrank "ezhufrank (6 commits)")[![lucklrj](https://avatars.githubusercontent.com/u/207632?v=4)](https://github.com/lucklrj "lucklrj (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)[pimcore/studio-backend-bundle

Pimcore Studio Backend Bundle

20171.5k14](/packages/pimcore-studio-backend-bundle)

PHPackages © 2026

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