openium / platinium-bundle
Provides push notification on Platinium for your Symfony4 Project
Installs: 354
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- symfony/framework-bundle: ^4.0
Requires (Dev)
- phpunit/phpunit: ^6
- symfony/phpunit-bridge: ^4.0
This package is not auto-updated.
Last update: 2025-04-09 15:27:09 UTC
README
This bundle provide a easy way to send a push message by using Platinium
Caution
Versions < 1.1.6 are deprecated
Installation
Open a command console, enter your project directory and execute:
$ composer require openium/platinium-bundle
Configuration
You need to add 4 information in the .env
###> openium/platinium-bundle ###
PLATINIUM_SERVER_ID=
PLATINIUM_SERVER_KEY=
PLATINIUM_SERVER_TOKEN_DEV=
PLATINIUM_SERVER_TOKEN_PROD=
###< openium/platinium-bundle ###
Usage
Example :
// set by dependency injection $notifier = new PlatiniumNotifier(...); // get number of future pushed devices $deviceCount = $notifier->subscribe($groups, $langs, $langNotIn, $latitude, $longitude, $tolerance, $radius, $paramsBag, $badgeValue, $newsStand, $sound); // send a push message $pushSended = $notifier->notify($message, $groups, $langs, $langNotIn, $latitude, $longitude, $tolerance, $radius);