PHPackages                             mantu/tp-service - 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. mantu/tp-service

ActiveN

mantu/tp-service
================

漫涂拾光公共服务,tp5.1.\*

V1.0.0(6y ago)080MITPHPPHP &gt;=5.6.0

Since Mar 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/1352255400/mantu-tp-service)[ Packagist](https://packagist.org/packages/mantu/tp-service)[ RSS](/packages/mantu-tp-service/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (2)Used By (0)

信息化公共服务
=======

[](#信息化公共服务)

基于tp5进行扩展 //完美支持tp5.1 //5.0兼容说明 /application/common.php新增env函数 use think\\Env; if (!function\_exists('env')) { function env($str = '',$end = '') { return Env::get($str,$end); } }

.env 配置：TP\_VERSION=50

基本使用：

1.配置：使用.env 可能涉及到配置： ;缓存配置（开发环境） REDIS\_HOST = '127.0.0.1'; REDIS\_PWD = ''; REDIS\_PORT = 6379; REDIS\_SELECT = 10; REDIS\_PREFIX = 'work:';

;公共服务域名地址 COMMON\_SERVICE\_DOMAIN = '';

2.使用 composer require ims/common-service

use ImsCommonService\\CommonService;

$CommonService = new CommonService(); $re= $CommonService-&gt;getUser(); p($re);die;

3.基本类库 //公共服务 use ImsCommonService\\BaseModel; //基础model（加入缓存封装） use ImsCommonService\\BaseModel; 使用： class DemoModel extends BaseModel

//基于tp缓存的封装 use ImsCommonService\\TpCacheService; 使用： $cache = new TpCacheService(); $key = 'demo';

//单key使用 //写入 $cache-&gt;set($key,time(),20); //读取 $cache-&gt;get($key); //删除 $cache-&gt;delete($key);

//缓存组使用 $keys = 'demo:'; for ($i=0; $i &lt; 10; $i++) { //写入 $cache-&gt;saveWithKey($keys, $key.$i, $i, 100); }

//删除 $cache-&gt;delWithKey($keys);

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

2243d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22653b0e739e398a39d6807aadc5b59b6d7a9391020b27005558c4c68cc7c041?d=identicon)[1352255400](/maintainers/1352255400)

---

Top Contributors

[![1352255400](https://avatars.githubusercontent.com/u/26536132?v=4)](https://github.com/1352255400 "1352255400 (2 commits)")

### Embed Badge

![Health badge](/badges/mantu-tp-service/health.svg)

```
[![Health](https://phpackages.com/badges/mantu-tp-service/health.svg)](https://phpackages.com/packages/mantu-tp-service)
```

PHPackages © 2026

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