2017 © Pedro Peláez
 

library pusher

single interface for using multiple pusher service

image

mhndev/pusher

single interface for using multiple pusher service

  • Monday, February 20, 2017
  • by majidphpdeveloper
  • Repository
  • 3 Watchers
  • 3 Stars
  • 225 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Single Interface Multiple Pusher Service

single interface for using multiple pusher service, (*1)

Included Service

  • FCM
  • GCM
  • Nginx Push Stream Module
  • Pubnub.com
  • Pusher.com

Sample Usage


use mhndev\pusher\PusherFactory; require 'vendor/autoload.php'; $httpClient = new \GuzzleHttp\Client(); $message = new \mhndev\pusher\Message([ 'name' => 'majid', 'family' => 'abdolhosseini', 'age' => 25 ]); //send message using pusher.com service $pusherDotComService = PusherFactory::createPusher( PusherFactory::PUSHER_PUSHERDOTCOM, ['app_key', 'app_secret', 'app_id', []] ); $pusherDotComService->push($message, 'device1'); //send message using pubnub.com service $pubnub = PusherFactory::createPusher( PusherFactory::PUSHER_PUBNUB, ['public_key', 'subscribe_key', 'secret_key'] ); $pubnub->push($message, 'device1'); //send message using FCM service $fcm = PusherFactory::createPusher( PusherFactory::PUSHER_FCM, ['api_key', $httpClient] ); $fcm->push($message, 'device1'); //send message using GCM service $gcm = PusherFactory::createPusher( PusherFactory::PUSHER_GCM, ['api_key'] ); $gcm->push($message, 'device1'); //send message using nginx push stream module $nginx = PusherFactory::createPusher( PusherFactory::PUSHER_NGINXMODULE, [$httpClient, 'http://example.com:8000'] ); $nginx->push($message, 'device1');

The Versions

15/02 2017

1.0.0

1.0.0.0 http://github.com/mhndev/pusher

single interface for using multiple pusher service

  Sources   Download

MIT

The Requires

 

The Development Requires

gcm pusher pusher.com pubnub fcm nginx pushstream module