PHP code example of mmfei / hyperf-async-event

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

    

mmfei / hyperf-async-event example snippets


$event = new \StdClass();
//$event->async_delay = 0;
$event->is_support_async = true;
$event->data = 'test';
\Hyperf\Utils\ApplicationContext::getContainer()->get(EventDispatcherInterface::class)->dispatch($event);

php bin/hyperf.php vendor:publish mmfei/hyperf-async-event

+ ./config/autoload/async_queue.php
+ ./config/autoload/dependencies.php
+ ./config/autoload/processer.php
+ ./config/autoload/redis.php