PHPackages                             panthsoni/tengxun - 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. panthsoni/tengxun

ActiveProject

panthsoni/tengxun
=================

this is a tengxun developer ball

v1.4.0(5y ago)024MITPHPPHP &gt;7.0.0

Since Nov 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/obeylisk/tengxun)[ Packagist](https://packagist.org/packages/panthsoni/tengxun)[ RSS](/packages/panthsoni-tengxun/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

tengxun
=======

[](#tengxun)

> 腾讯集团微信、扣扣等开发包

安装
--

[](#安装)

> composer require panthsoni/tengxun

使用方法
----

[](#使用方法)

### 1、微信开发者模式

[](#1微信开发者模式)

```
namespace app\example;

use panthsoni\tengxun\weixin\developer\Developer;

class Example {
    /*构造方法*/
    protect static $method = [

    ]
    protect static $developer;
    public function __construct(){
        self::$developer = Developer::init([
            'appid' => '',    //公众号appid，非必填，仅当安全模式下必填
            'encoding_aes_key' => '',  //随机密钥，非必填，仅当安全模式下必填
            'msg_signature' => '',  //消息签名，非必填，仅当安全模式下必填
        ]);
    }

    /*微信监听方法*/
    public function listen(){
        /*微信监听，setMethod为listen，当setIsSafe为true时，模式为安全模式，返回数组格式*/
        $res = self::$developer->setParams([
            'signature' => '',  //签名
            'timestamp' => 1562212362,
            'nonce' => '',  //随机字符串
            'token' => '',   //token码
            'echostr' => '',  //非必填，仅当第一次验证时传入
        ])->setMethod('listen')->setIsSafe(true)->getResult();

        return $res;
    }

    /*被动回复用户信息方法*/
    public function replyMessage(){
        /*微信监听，setMethod为replyMessage，当setIsSafe为true时，模式为安全模式，返回数组格式*/
        $res = self::$developer->setParams([
            'msg_type' => '',   //消息类型，text,voice,video,music,news,image,transfer_customer_service
            'to_user_name' => '',   //接收用户openid
            'from_user_name' => ''   //发送者
        ])->setBizParams([
            'content' => '',   //内容，仅当消息类型为text时，必填
            'media_id' => '',   //媒体ID，仅当消息类型为voice,video,music,image时，必填
            'title' => '',    //非必填，标题
            'description' => '',   //非必填，描述
            'music_url' => '',   //非必填，音乐链接
            'hq_music_url' => '',   //非必填，音乐hq链接
            'article_counts' => 1,  //文章个数，仅当消息类型为news时，必填
            'article_content' => [
                [
                    'title' => '',   //标题，仅当消息类型为news时，必填
                    'description' => '',   //描述，仅当消息类型为news时，必填
                    'pic_url' => '',   //图片链接，仅当消息类型为news时，必填
                    'url' => '',   //跳转链接，仅当消息类型为news时，必填
                ]
            ]
        ])->setMethod('replyMessage')->setIsSafe(true)->getResult();

        exit($res);
    }

    /*获取access_token*/
    public function getAccessToken(){
        $res = self::$developer->setParams([
            'secret' => ''
        ])->setMethod('get_base_access_token')->getResult();

        return $res;
    }

    /*菜单服务，相关方法有create_menu,get_menu,del_menu,create_self_menu,del_self_menu,get_self_menu*/
    public function menu(){
        $res = self::$developer->setParams([
            'access_token' => '',
            'button' => '',
            'menuid' => ''
        ])->setMethod('create_menu')->getResult();

        return $res;
    }
}

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.7% 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 ~29 days

Total

5

Last Release

1948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25a2c10a9d191391b3b3767c95779ccc2c6e502328f552457591de4a88374d05?d=identicon)[panthsoni](/maintainers/panthsoni)

---

Top Contributors

[![yufeiqiang](https://avatars.githubusercontent.com/u/34391616?v=4)](https://github.com/yufeiqiang "yufeiqiang (14 commits)")[![Huangzhichao980](https://avatars.githubusercontent.com/u/40282306?v=4)](https://github.com/Huangzhichao980 "Huangzhichao980 (5 commits)")

### Embed Badge

![Health badge](/badges/panthsoni-tengxun/health.svg)

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

PHPackages © 2026

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