PHPackages                             sugao2013/getui - 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. sugao2013/getui

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

sugao2013/getui
===============

getui for Yii2

41991PHP

Since May 16Pushed 8y ago2 watchersCompare

[ Source](https://github.com/lyx2297999137/yii2-igetui)[ Packagist](https://packagist.org/packages/sugao2013/getui)[ RSS](/packages/sugao2013-getui/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

yii2-igetui
===========

[](#yii2-igetui)

yii2个推
------

[](#yii2个推)

**配置：**

```
'components' => [
'getui'=>[
'class'=>'sugao2013\getui\Push',
'appId' => 'Utt9VAqlZw9LrrDUfNGPc3', //你的APPID
'appKey' => 'f1m9HzIL6D9gTXAkHsvuw2', //你的APPKEY  //   Lw2ycZlZtU9tLKzmafi1I6
'masterSecret' => 'UZJ3xFDr4l7FtkMfeQKiP8', //你的masterSecret
'host' => 'http://sdk.open.api.igexin.com/apiex.htm',
],

```

**使用时配置参数template\_type说明：**

```
所有推送接口均支持四个消息模板，依次为通知弹框下载模板，通知链接模板，通知透传模板，透传模板
注：IOS离线推送需通过APN进行转发，需填写pushInfo字段，目前仅不支持通知弹框下载功能
1.点击通知打开应用模板  ====>IGtNotificationTemplateDemo()
    $config=[
  'title'=>'title',
  'text'=>'text',
  'template_type'=>1
  ];
2.点击通知打开网页模板  ====>IGtLinkTemplateDemo()
    $config=[
  'title'=>'title',
  'text'=>'text',
  'url'=>'http://www.baidu.com',
  'template_type'=>2
  ];
3.点击通知弹窗下载模板  ====>IGtNotyPopLoadTemplateDemo()
     $config=[
  'notyTitle'=>'notyTitle',
  'notyContent'=>'notyContent',
  'popTitle'=>'popTitle',
  'popContent'=>'popContent',
  'template_type'=>3
  ];
4.透传消息模版    =====>IGtTransmissionTemplateDemo()
    $config=[
        'type'=>'2', //收到消息是否立即启动应用，1为立即启动，2则广播等待客户端自启动
        'content'=>'我传的内容哦',
        'template_type'=>4
    ];

```

推送
==

[](#推送)

### 1. 对单个用户推送消息：pushMessageToSingle()

[](#1-对单个用户推送消息pushmessagetosingle)

```
$config=[
  'title'=>'title',
  'text'=>'text',
  'url'=>'http://www.baidu.com',
  'template_type'=>2
  ];
  $cid='f0d2b92075a0f86e09d049b0d096322b';
  Yii::$app->getui->config($config)->pushMessageToSingle($cid);

```

### 2. 对指定列表用户推送消息pushMessageToList()

[](#2-对指定列表用户推送消息pushmessagetolist)

```
$config=[
   'title'=>'title',
   'text'=>'text',
   'url'=>'http://www.baidu.com',
   'template_type'=>2
   ];
$cids=['f0d2b92075a0f86e09d049b0d096322b','f0d2b92075a0f86e09d049b0d096322b'];
Yii::$app->getui->config($config)->pushMessageToSingle($cids);

```

### 3. 对指定应用群推消息&amp;&amp;应用群推条件交并补功能pushMessageToApp()

[](#3-对指定应用群推消息应用群推条件交并补功能pushmessagetoapp)

```
  手机类型 "phoneType"=>array('ANDROID')
  地区   "region"=>array('浙江')
  自定义tag "tag"=>array('haha')
  'age'=>array("0000", "0010")
  上面情况一个以及一个以上就可以了。
  用法示例：
  $config=[
  'title'=>'title',
  'text'=>'text',
  'url'=>'http://www.baidu.com',
  'template_type'=>2
  ];
  $conditions=[
  ['name'=>'phoneType','value'=>array('ANDROID'),'opt'=>'or'],
  ['name'=>'region','value'=>array('浙江','福建'),'opt'=>'and'],
  ['name'=>'tag','value'=>array('haha'),'opt'=>'not']
  ];
  Yii::$app->getui->config($config)->pushMessageToApp($conditions);

```

### 4. 批量单推功能pushMessageToSingleBatch()

[](#4-批量单推功能pushmessagetosinglebatch)

```
$configs[0]=[
   'title'=>'title',
   'text'=>'text',
   'url'=>'http://www.baidu.com',
   'template_type'=>2,
   'cid'=>'f0d2b92075a0f86e09d049b0d096322b'>
   ];
   $configs[1]=[
   'notyTitle'=>'notyTitle',
   'notyContent'=>'notyContent',
   'popTitle'=>'popTitle',
   'popContent'=>'popContent',
   'template_type'=>3,
   'cid'=>'f0d2b92075a0f86e09d049b0d096322b'
   ];
   用法
Yii::$app->getui->pushMessageToSingleBatch($configs);

```

其它接口
====

[](#其它接口)

1别名
---

[](#1别名)

### 1. 对指定用户设置tag属性setTag()

[](#1-对指定用户设置tag属性settag)

```
用法
Yii::$app->getui->setTag('f0d2b92075a0f86e09d049b0d096322b’,array('', '中文', 'English'));

```

### 2. 获取指定用户的tag属性getUserTags()

[](#2-获取指定用户的tag属性getusertags)

```
用法
Yii::$app->getui->getUserTags('f0d2b92075a0f86e09d049b0d096322b');

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/56f3dcdd0affe25bc7126a8b0cb9508817666d16ae78c93ab6b511f7988d5fcb?d=identicon)[lyx2297999137](/maintainers/lyx2297999137)

---

Top Contributors

[![lyx2297999137](https://avatars.githubusercontent.com/u/17544012?v=4)](https://github.com/lyx2297999137 "lyx2297999137 (22 commits)")

### Embed Badge

![Health badge](/badges/sugao2013-getui/health.svg)

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

###  Alternatives

[vrkansagara/lara-out-press

This is simply compress your final out of Laravel Application and serve to the browser.

6725.7k](/packages/vrkansagara-lara-out-press)

PHPackages © 2026

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