1. Go to this page and download the library: Download poolbang/queue 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/ */
poolbang / queue example snippets
namespace App\Models\Logic;
use Queue\JobHandler;
use Swoft\Bean\Annotation\Mapping\Bean;
/**
* @Bean(scope=Bean::PROTOTYPE)
* Class QueueLogic
* @package App\Models\Logic
*/
class QueueLogic extends JobHandler
{
protected function perform()
{
echo 'JobId: ' . $this->id . PHP_EOL;
var_dump($this->args);
}
}