rezzza / processone-bundle
ProcessOne bundle for Symfony2 projects
Installs: 13 092
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
Requires (Dev)
- atoum/atoum: ~2.0
- guzzle/guzzle: 3.*
This package is not auto-updated.
Last update: 2024-12-18 12:20:38 UTC
README
Installation
"require": {
'rezzza/processone-bundle': '*',
}
Enable Bundle
In AppKernel
:
$bundles = array( //.... new Rezzza\ProcessOneBundle\RezzzaProcessOneBundle(), //.... );
Configuration
rezzza_process_one: connections: default: transport: guzzle host: https://subdomain.process-one.net publish: key: MY_KEY secret: MY_SECRET expire: 10
Usage
use Rezzza\ProcessOneBundle\Recipient; use Rezzza\ProcessOneBundle\Message; $conn = $this->get('rezzza.process_one.default.connection'); // recipients $recipients = new Recipient\TagRecipient(array('@registered')); $recipients = new Recipient\AliasRecipient(array('user@domain.tld')); $recipients = new Recipient\DeviceTokenRecipient(array('device-token')); // message $message = new Message\ApsMessage(); $message->setApsData('alert', '..'); $message->setApsData('badge', 1337); $message->setData('custom_element', 'value'); $conn->setRecipient($recipients) ->setMessage($message) ->send();
Customisation
You can easily add new messages
, recipients
, transport
Wishlist
- Tests
- Standalone library