2017 © Pedro Peláez
 

yii2-extension yii2-umengpush

umengpush

image

daidai118/yii2-umengpush

umengpush

  • Thursday, October 13, 2016
  • by daidai118
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

友盟推送, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

composer require daidai118/yii2-umengpush

to the require section of your composer.json file., (*3)

Usage

Once the extension is installed, simply use it in your code by : 追加到components中, (*4)


'push'=>[ 'class' => 'daidai118\umengpush\Umeng', 'appkey'=>'xxxx', 'secret'=>'xxxx', 'alias_type'=>'fs', 'production'=>false, ],

往ios发送别名消息 默认为安卓, (*5)

Yii::$app->pushios->setStyle(Umeng::Ios)->customNotification('fs2',[
            'ticker'=>'abcdef',
            'title'=>'abcdef!',
            'text'=>'a什么鬼'.date("h:i:s"),
        ]);
Yii::$app->pushios->customNotification('fs2',[
            'ticker'=>'abcdef',
            'title'=>'abcdef!',
            'text'=>'a什么鬼'.date("h:i:s"),
        ]);

广播消息, (*6)

        Yii::$app->push->broadcastNotification([
            'ticker'=>'abcdef',
            'title'=>'abcdef!',
            'text'=>'a什么鬼'.date("h:i:s"),
        ]);

按照设备推送, (*7)

Yii::$app->push->sendNotificationToDevices('devices_token',[
            'ticker'=>'abcdef',
            'title'=>'abcdef!',
            'text'=>'a什么鬼'.date("h:i:s"),
        ]);

The Versions

13/10 2016

dev-master

9999999-dev

umengpush

  Sources   Download

MIT

The Requires

 

by daidai

extension yii2

13/10 2016

0.2.2

0.2.2.0

umengpush

  Sources   Download

MIT

The Requires

 

by daidai

extension yii2