2017 © Pedro Peláez
 

library push

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

image

genkgo/push

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  • Thursday, December 22, 2016
  • by frederikbosch
  • Repository
  • 4 Watchers
  • 8 Stars
  • 4,568 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 8 % Grown

The README.md

Genkgo.Push

Send push messages to Android, Apple and Firebase using one interface, (*1)

Installation

Requires a PHP version getting security updates. It is installable and autoloadable via Composer as genkgo/push., (*2)

Quality

workflow code check, (*3)

To run the unit tests at the command line, issue phpunit -c tests/. PHPUnit is required., (*4)

This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request., (*5)

Send Push Messages

<?php
use Genkgo\Push\Body;
use Genkgo\Push\Firebase\CloudMessaging;
use Genkgo\Push\Gateway;
use Genkgo\Push\Message;
use Genkgo\Push\Sender\FirebaseSender;
use Genkgo\Push\Sender\AppleApnSender;
use Genkgo\Push\Recipient\AndroidDeviceRecipient;
use Genkgo\Push\Recipient\AppleDeviceRecipient;
use Genkgo\Push\Recipient\FirebaseRecipient;

// construct the gateway, using the different senders
$gateway = new Gateway([
    AppleApnSender::fromToken('/location/to/key.p8', 'keyId', 'teamId', 'bundleId'),
    new FirebaseSender(new CloudMessaging($guzzleClient, $auth), 'fcm-project-id')
]);

// below message will automatically go to their own specific sender
$gateway->send(new Message(new Body('message content')), new AndroidDeviceRecipient('token'));
$gateway->send(new Message(new Body('message content')), new AppleDeviceRecipient('token'));
$gateway->send(new Message(new Body('message content')), new FirebaseRecipient('token'));

Contributing

  • Found a bug? Please try to solve it yourself first and issue a pull request. If you are not able to fix it, at least give a clear description what goes wrong. We will have a look when there is time.
  • Want to see a feature added, issue a pull request and see what happens. You could also file a bug of the missing feature and we can discuss how to implement it.

The Versions

22/12 2016

dev-master

9999999-dev

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  Sources   Download

The Requires

 

The Development Requires

22/12 2016

1.0.0

1.0.0.0

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  Sources   Download

The Requires

 

The Development Requires

16/06 2016

0.4.1

0.4.1.0

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  Sources   Download

The Requires

 

The Development Requires

16/06 2016

0.4.0

0.4.0.0

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  Sources   Download

The Requires

 

The Development Requires

16/06 2016

0.3.0

0.3.0.0

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  Sources   Download

The Requires

 

The Development Requires

16/06 2016

0.2.1

0.2.1.0

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  Sources   Download

The Requires

 

The Development Requires

15/06 2016

0.2.0

0.2.0.0

Send push messages to Android, Apple and Windows using one interface. Bonus: generate Apple push certificates automatically

  Sources   Download

The Requires

 

The Development Requires

02/12 2015

0.1.0

0.1.0.0

Send push messages to Android, Apple and Windows using one interface

  Sources   Download

The Requires

 

The Development Requires