1. Go to this page and download the library: Download fyre/event 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/ */
fyre / event example snippets
use Fyre\Event\EventManager;
$eventManager = new EventManager($parentEventManager);
$eventManager->addListener($eventListener);
$eventManager->clear();
$eventManager->dispatch($event);
$hasEvent = $eventManager->has($name);
$eventManager->off($name, $callback);
$eventManager->off($name);
$eventManager->on($name, $callback, $priority);
$eventManager->removeListener($eventListener);
$event = $eventManager->trigger($name, ...$args);
use Fyre\Event\Event;
$event = new Event($name, $subject, $data, $cancelable);