PHPackages                             fanguojie/f-think-admin - 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. fanguojie/f-think-admin

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

fanguojie/f-think-admin
=======================

简单常用工具

v0.28(6y ago)015MITPHP

Since Jan 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/863416870/FThinkAdmin)[ Packagist](https://packagist.org/packages/fanguojie/f-think-admin)[ RSS](/packages/fanguojie-f-think-admin/feed)WikiDiscussions master Synced yesterday

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

**git**

```
git tag -a v0.21 -m "publish v0.21 version"
git push origin v0.21

git tag -d v0.21
git push origin :refs/tags/v0.21

```

php
===

[](#php)

**通用网络请求**

```
// 发起get请求
$result = http_get($url,$query,$options);
$result = \library\tools\Http::get($url,$query,$options);

// 发起post请求
$result = http_post($url,$data,$options);
$result = \library\tools\Http::post($url,$data,$options);

```

**emoji 表情转义（部分数据库不支持可以用这个）**

```
// 输入数据库前转义
$content = emoji_encode($content);

// 输出数据库后转义
$content = emoji_decode($content);

```

**获取对象反射实例**

```
获取类反射实例
$reflex = Reflex($object);
获取类方法反射示例
$reflex = Reflex($object);
$actionReflex = $reflex->setMethod($action);

类注释举例：
/**
 * Class Book
 * @route('v1/book')
 * @package app\api\controller\v1
 */
class Book
{
}
获取：
$route = $reflex->get('route',['rule']);
结果：
$route = {
    ['rule' => '/v1/book/']
}

方法注释举例：
/**
 * 查询指定bid的图书
 * @route('v1/book/:bid','get')
 * @param Request $bid
 * @param('bid','bid的图书','require')
 * @return mixed
 */
public function getBook($bid)
{
    $result = BookModel::get($bid);
    return $result;
}
获取：
$route = $actionReflex->get('route',['rule','method']);
结果：
$route = {
    ['rule' => '/v1/book/','method' => 'get']
}
```

**队列**

```
use library\queue;

$queue = new queue(100);
$queue->setUniqid('1');
var_dump($queue->getMaxSize());
var_dump($queue->isFull());
var_dump($queue->count());
var_dump($queue->getQueueName());
while (count($queue)) {
	var_dump( $queue->deQueue() );
}
/*
$i = 0;
while( !$queue->isFull() ) {
	var_dump( $queue->enQueue($i++) );
}
*/
```

**并发类制定 swoole协程并发类**

```
$many = new many\SwooleMany(4);
$queue = new queue\PhpQueue(10);
$a = 0;
while ( $queue->isFull() ) {
	$queue->enQueue( ++$a );
}
$many->go(function($ser,$que){
	print_r( $ser->getMid() );
	$list = [];
	while ( count($que) ) {
		$list[] = $que->deQueue();
	}
	return $list;

},$queue);
$many->to(function($ser, $list){
	print_r( $ser->getSid() );
	print_r( $list );
});
```

**Redis**

```
use library\tools\RedisBase;

$redisBase = new RedisBase($option,$section = 'default');
$option参数
 ["host" => "127.0.0.1",
"port" => "6379",
"connect_timeout" => "1.5",
"connect_retry_delay" => '100', //毫秒
"connect_retry_times" => 3,
"password" => '',]
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

2316d ago

### Community

Maintainers

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

---

Top Contributors

[![fanguojie923](https://avatars.githubusercontent.com/u/43089579?v=4)](https://github.com/fanguojie923 "fanguojie923 (20 commits)")

### Embed Badge

![Health badge](/badges/fanguojie-f-think-admin/health.svg)

```
[![Health](https://phpackages.com/badges/fanguojie-f-think-admin/health.svg)](https://phpackages.com/packages/fanguojie-f-think-admin)
```

PHPackages © 2026

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