PHP code example of rezzza / processone-bundle
1. Go to this page and download the library: Download rezzza/processone-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rezzza / processone-bundle example snippets
$bundles = array(
//....
new Rezzza\ProcessOneBundle\RezzzaProcessOneBundle(),
//....
);
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('[email protected]'));
$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();