PHP code example of tjovaisas / delayed-event-bundle

1. Go to this page and download the library: Download tjovaisas/delayed-event-bundle 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/ */

    

tjovaisas / delayed-event-bundle example snippets


return [
    //...
    \Tjovaisas\Bundle\DelayedEventBundle\TjovaisasDelayedEventBundle::class => ['all' => true],
];

#[AsDelayedEventListener(event: 'some_event', method: 'onEvent', priority: 1)]
class SomeListener
{
    //...
}

#[AsDelayedEventListener(event: 'some_event')]
public function onEvent(): void
{
    //...
}
xml
<service class="Namespace\SomeListener"
         id="namespace.some_listener">
    <tag name="tjovaisas.event_listener.post_flush" event="some_event" method="onEvent" priority="1" />
</service>