devisr/events

Hooks-based events system, component of the Devisr Framework

Maintainers

Details

gitlab.com/devisr/events

Source

Issues

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/devisr/events

dev-master 2018-06-12 21:35 UTC

This package is auto-updated.

Last update: 2025-10-13 14:44:48 UTC


README

Devisr Events is a hooks-based events library to help with plugin systems.

To listen to an event:

    Events::listen("event.name", function($arguments) {
        // do stuff here
        return [ 1, 2, 3 ]; // optionally pass new arguments to the event target
    });

To create and invoke an event:

    (new Event("event.name", function($arguments) {
        // default event actions go here
        return 1; // optionally pass a value to the event.name:end event 
    }))($arguments) // pass default event arguments