PHPackages                             xionglonghua/yii2-mns - 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. [API Development](/categories/api)
4. /
5. xionglonghua/yii2-mns

ActiveLibrary[API Development](/categories/api)

xionglonghua/yii2-mns
=====================

Aliyun MNS library for Yii2 framework

1.0.2(7y ago)017MITPHPPHP ~5.5|~7.0

Since Jan 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/xionglonghua/yii2-mns)[ Packagist](https://packagist.org/packages/xionglonghua/yii2-mns)[ RSS](/packages/xionglonghua-yii2-mns/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (4)Used By (0)

Yii2 Aliyun MNS
===============

[](#yii2-aliyun-mns)

Yii2-Aliyun-Mns是阿里云平台消息服务的Yii2封装。

安装方法
----

[](#安装方法)

推荐的安装方式是通过[composer](http://getcomposer.org/download/).

手动执行

```
php composer.phar require xionglonghua/yii2-mns

```

或者添加

```
"xionglonghua/yii2-mns": "*"

```

到工程的 `composer.json` 文件

配置组件
----

[](#配置组件)

```
'mns'=>[
    'class'=>'xionglonghua\yii2mns\Mns',
    'accessId' => '',
    'accessKey' => '',
    'endpoint' => 'http://.mns.cn-beijing.aliyuncs.com/',
],
```

使用示例
----

[](#使用示例)

发送消息:

```
\Yii::$app->mns->myqueue->send("test content");
```

接收消息:

```
$content = \Yii::$app->mns->myqueue->receive();
echo $content, "\n";
```

批量发送消息:

```
$contents = [
    'test content',
    'test content again',
];
\Yii::$app->mns->myqueue->sendBatch($contents);
```

批量接收消息:

```
$contents = \Yii::$app->mns->myqueue->receiveBatch(100);
foreach ($contents as $content) {
    echo $content, "\n";
}
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~0 days

Total

3

Last Release

2659d ago

### Community

Maintainers

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

---

Top Contributors

[![xionglonghua](https://avatars.githubusercontent.com/u/13514519?v=4)](https://github.com/xionglonghua "xionglonghua (5 commits)")

---

Tags

MQyii2aliyunmnsyii2-mns

### Embed Badge

![Health badge](/badges/xionglonghua-yii2-mns/health.svg)

```
[![Health](https://phpackages.com/badges/xionglonghua-yii2-mns/health.svg)](https://phpackages.com/packages/xionglonghua-yii2-mns)
```

###  Alternatives

[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)[conquer/services

Yii2 soap wsdl web services

1632.5k](/packages/conquer-services)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

143.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

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