alonity/eventhandler

Alonity event handler

dev-main 2022-03-13 15:37 UTC

This package is auto-updated.

Last update: 2024-05-13 20:27:02 UTC


README

Simple event handler class

Install

composer require alonity/eventhandler

Examples

use alonity\events\Handler;

require('vendor/autoload.php');

// Listen event "example"
Handler::listen('example', function(){
    echo 'Event "example" running';
});

// Call to event "example"
Handler::emit('example');