PHP code example of linkorb / notifier
1. Go to this page and download the library: Download linkorb/notifier 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/ */
linkorb / notifier example snippets
$notifier = new Notifier\Notifier();
$notifier->pushProcessor(function($message) {
$recipients = $message->getRecipients();
// only set the filters just before sending.
foreach ($recipients as &$recipient) {
if ($recipient->getData() == 'Dries') {
$recipient->addType('test', 'var_dump');
}
}
return $message;
});
$notifier->pushHandler(new Notifier\Handler\VarDumpHandler(array('test', 'mailing')));
$message = new Notifier\Message\Message('test');
$message->addRecipient(new Notifier\Recipient\Recipient('Dries'));
$notifier->sendMessage($message);