PHP code example of gephart / event-manager
1. Go to this page and download the library: Download gephart/event-manager library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gephart / event-manager example snippets
$listener1 = function () { echo "Hello"; };
$listener2 = function () { echo "World"; };
$event_manager->attach("my.event", $listener1, 200);
$event_manager->attach("my.event", $listener2, 100);
$event_manager->trigger("my.event"); // HelloWorld