openium / platinium
This package is abandoned and no longer maintained.
The author suggests using the openium/platinium-bundle package instead.
Openium Web Toolkit for Symfony Project
2.0.0
2018-07-19 14:53 UTC
Requires
- php: ^7.1
This package is not auto-updated.
Last update: 2019-10-15 13:40:07 UTC
README
Caution
this package is deprecated
please use platinium-php-bundle
Install with composer
composer require openium/platinium
How to use it
When you create your entity, you have to implements PushEntityInterface
in your entity or use Push entity.
Push without geolocalization
<?php // Entity to push $myEntity = new Push("message"); // Vars $platiniumUrl = '...'; $platiniumServer = '...'; $apiServerId = '...'; $apiServerKey = '...'; $apiServerTokenDev = '...'; $apiServerTokenProd = '...'; // Prepare Push Service $pushService = new PushService(); $pushService->setServerInfo( $platiniumUrl, $platiniumServer, $apiServerId, $apiServerKey, $apiServerTokenDev, $apiServerTokenProd ); // Push $pushGroups = ['myGroups']; $langs = ['fr']; $pushService->push($myEntity, $pushGroups, $langs);
Push with geolocalization
<?php // Entity to push $myEntity = new Push("message"); // Vars $platiniumUrl = '...'; $platiniumServer = '...'; $apiServerId = '...'; $apiServerKey = '...'; $apiServerTokenDev = '...'; $apiServerTokenProd = '...'; $latitude = '...'; $longitude = '...'; $radius = '...'; $tolerance = '...'; // Prepare Push Service $pushService = new PushService(); $pushService->setServerInfo( $platiniumUrl, $platiniumServer, $apiServerId, $apiServerKey, $apiServerTokenDev, $apiServerTokenProd ); $pushService->setPushLocation( true, $latitude, $longitude, $radius, $tolerance ); // Push $pushGroups = ['myGroups']; $langs = ['fr']; $pushService->push($myEntity, $pushGroups, $langs);
Credits
Authors : Thomas LEDUC & Alexandre CAILLOT