vaibhavpandeyvpz / soochak
A simple but useful events manager based on PSR-14 draft for PHP >= 5.3.
1.0
2017-01-18 11:47 UTC
This package is auto-updated.
Last update: 2024-10-07 00:50:13 UTC
README
A simple but useful events manager based on PSR-14 draft for PHP >= 5.3.
Soochak:
सूचक
(Notifier)
Install
composer require vaibhavpandeyvpz/soochak
Usage
<?php $em = new Soochak\EventManager(); // Attach a callback to 'login.success' event $em->attach('login.success', function ($event) { /** * Perform your event logic like sending notification email * You can optionally stop an event from further propagation. */ $event->stopPropagation(true); }); // Anywhere in your app, trigger 'login.success' event $em->trigger('login.success');
License
See LICENSE.md file.