dareit/notification-manager

Notification manager

Maintainers

Package info

github.com/DareIt/notification-manager

pkg:composer/dareit/notification-manager

Statistics

Installs: 103

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 4

1.0.0 2018-03-05 10:20 UTC

README

Notification manager is a very simple and lightweight library to handle notifications.

Usage

Most Basic use of the lib

 $handler = new FooHandler();
 $notification = new FooNotification();
 
 $map = new InMemoryNotificationHandlerMap();
 $map->mapNotificationToHandler($notification, $handler);
 
 $logger = new Logger();
 
 $manager = new NotificationManager($map, $logger);
 $manager->dispatch($notification);