dareit/notification-manager

Notification manager

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);