signalert/signalert

A notifications package to provide UI notifications to users and admins alike

1.0.6 2015-09-20 10:08 UTC

This package is not auto-updated.

Last update: 2024-05-07 02:09:10 UTC


README

Customisable & Extensible Notifications - Providing Alerts Exactly Where You Need Them

Build Status Coverage Status Release License

Signalert is a PHP notifications implementation designed to allow you to communicate effectively from anywhere in your application's code to your users.

Installing Signalert

Signalert is a composer-enabled package, so installing it is as simple as adding it to your composer.json file:

"require": {
    "signalert/signalert": "dev-master"
},

Then run composer update signalert/signalert to see the package installed.

How to use Signalert

Signalert makes it simple to store messages:

$signalert = new Signalert();
$signalert->store('Notification Name', 'homepage');

Signalert makes it simple to render messages:

$signalert = new Signalert();
$signalert->render('homepage', 'error');

Signalert even makes it simple to retrieve messages as an array:

$signalert = new Signalert();
$signalert->fetch('homepage', 'error');

Customising

By default, Signalert gives access to its SessionDriver to store messages in the default session, and also allows you to access to a simple bootstrap renderer classes.

You can customise any of these by writing your own classes, and specifying them within the configuration file .signalert.yml which should exist within your project root.

renderer: \Signalert\Renderer\BootstrapRenderer
driver: \Signalert\Storage\SessionDriver

Providing the full class name for each of these items will allow Signalert to understand and utilise them in its processes.