PHP code example of ironbound / psr-14-wp

1. Go to this page and download the library: Download ironbound/psr-14-wp 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/ */

    

ironbound / psr-14-wp example snippets


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() );