ironbound/psr-14-wp

PSR-14 Events Implementation for WordPress

Maintainers

Package info

github.com/iron-bound-designs/psr-14-wp

pkg:composer/ironbound/psr-14-wp

Statistics

Installs: 30

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 4

0.1 2019-12-28 22:53 UTC

This package is auto-updated.

Last update: 2026-02-28 00:23:22 UTC


README

Very simple PSR-14 Event Dispatcher for WordPress.

Usage

use IronBound\Psr14WP\EventDispatcher;
use function IronBound\Psr14WP\listen;

listen( static function( Your_Event $event ) {
    // Do something with $event
} );

$event_dispatcher = new EventDispatcher();
$dispatched = $event_dispatcher->dispatch( new Your_Event() );