PHPackages                             davidxu/yii2-igt - 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. davidxu/yii2-igt

ActiveLibrary

davidxu/yii2-igt
================

The iGetui SDK integration for the Yii2 framework and PHP 5.4

1.0.4(7y ago)2127[1 issues](https://github.com/davidxuuts/yii2-igt/issues)MITPHPPHP &gt;=5.4.0

Since Oct 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/davidxuuts/yii2-igt)[ Packagist](https://packagist.org/packages/davidxu/yii2-igt)[ RSS](/packages/davidxu-yii2-igt/feed)WikiDiscussions master Synced 2mo ago

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

Getui Library with Psr-4
========================

[](#getui-library-with-psr-4)

Based on Getui SDK (PHP) 4.0.1.0

Functions
---------

[](#functions)

1. Silent transmission message to single user
2. Normal transmission message to single user
3. Normal transmission message to all users

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require davidxu/yii2-igt

```

or add

```
"davidxu/yii2-igt": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
use davidxu\igt\Getui;
class PushController extends Controller
{
	/**
	 * Send normal transmission message to all app users
	 * Will play a sound and a badge (1) will display
	 *
	 *   $content = [
	 *       'payloadTitle' => 'transmission Title',
	 *       'payloadContet' => 'transmission content here',
	 *   ];
	 *    $payload = Json::encode($content);
	 *    $alertTitle = 'Attention Please';
	 *    $alert_body = 'Alert Body Here, you have a unread message';
	 *
	 * @param mixed $content
	 * @param string $alertBody
	 * @param string $alertTitle
	 * @return mixed|null
	 *
	 * Sample of return result
	 * {
	 *    "result": "ok",
	 *    "contentId": "OSA-1031_tAvRLPhf5Q9d2IAADSKOn9"
	 *  }
	 *
	 */
	public function actionSystemMsg($content, $alertBody, $alertTitle)
	{
	    $getui = new Getui();
	    $getui->appId = '';
	    $getui->appkey = '
