Notifier acts as a notification center.
Recipients will only receive the messages they signed up for.
<?php
$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);
The project is still in development and is not yet suited for production environments.
Notifier is stripped of most handlers. You can find a list of all available handler.
All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.
Fork the project, create a feature branch, and send us a pull request.
To ensure a consistent code base, you should make sure the code follows the Coding Standards which we borrowed from Symfony. Make sure to check out php-cs-fixer as this will help you a lot.
If you would like to help take a look at the list of issues.
PHP 5.3.2 or above
Dries De Peuter - [email protected] - http://nousefreak.be
See also the list of contributors who participated in this project.
Notifier is licensed under the MIT license.