PHP code example of bbit / async-dispatcher-bundle

1. Go to this page and download the library: Download bbit/async-dispatcher-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/ */

    

bbit / async-dispatcher-bundle example snippets

 bash
$ php composer.phar update bbit/async-dispatcher-bundle
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new BBIT\AsyncDispatcherBundle\BBITAsyncDispatcherBundle(),
    );
}
 php
$dispatcher = $this->container->get('bbit_async_dispatcher.dispatcher'); // get dispatcher service
$dispatcher->addAsyncEvent('name_of_the.event', new CustomEvent($entity));