1.0.0
1.0.0.0The iGetui SDK integration for the Yii2 framework and PHP 5.5
MIT
The Requires
by David Xu
extension yii2 getui igt
The iGetui SDK integration for the Yii2 framework and PHP 5.4
Based on Getui SDK (PHP) 4.0.1.0, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require davidxu/yii2-igt
or add, (*4)
"davidxu/yii2-igt": "*"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply use it in your code by :, (*6)
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 = '<appId>'; $getui->appkey = '<appKey'>; $getui->$masterSecret = '<masterSecret'>; $response = $getui->pushTransmissionAlertToApp($content, $alertBody, $alertTitle); return $response; } }
Please refer to Getui official documentation and Apple Local and Remote Notification Programming Guide, (*7)
This package should can be used for other frameworks also., (*8)
Any other question please contact me at david.xu.uts@163.com, (*9)
The iGetui SDK integration for the Yii2 framework and PHP 5.5
MIT
extension yii2 getui igt