ironbound / psr-14-wp
PSR-14 Events Implementation for WordPress
0.1
2019-12-28 22:53 UTC
Requires
- php: >=7.2.0
- psr/event-dispatcher: ^1.0
Requires (Dev)
- johnpbloch/wordpress-core: ^5.3
- phpunit/phpunit: ^8.5
- squizlabs/php_codesniffer: ^3.5
Provides
This package is auto-updated.
Last update: 2024-11-29 06:03:36 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() );