1. Go to this page and download the library: Download italix/events 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/ */
italix / events example snippets
// conf.php — the whole registry, in one place
Events::class => static fn(): Events => (new Events())
->on('record.status_changed', [NotifyParties::class, 'handle'])
->on('record.status_changed', [WriteAuditRow::class, 'handle'], 10),
$this->events->dispatch('record.status_changed', new RecordStatusChanged($id, 'CONFIRMED'));