PHP code example of abacaphiliac / events-capable

1. Go to this page and download the library: Download abacaphiliac/events-capable 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/ */

    

abacaphiliac / events-capable example snippets


return [
    'service_manager' => [
        'factories' => [
            \MyListener::class => \MyListenerFactory::class,
        ],
        'initializers' => [
            \abacaphiliac\EventsCapable\EventsCapableInitializer::class,
        ],
    ],
];

return [
    'abacaphiliac/events-capable' => [
        'eventsCapable' => [
            \MyEventsCapableService::class => [
                \MyListener::class,
            ],
        ],
    ],
];