1. Go to this page and download the library: Download queues/queue-manager 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/ */
queues / queue-manager example snippets
class LongJob extends \Queue\Job {
public function run() {
sleep(10);
return $this->getData();
}
}
$queue='MyQueue';
$context=array();
$newJob = new LongJob()
$queuemanager = new QueueManager($context, $queue);
$queuemanager->getQueue($name)->addJob($newJob);
class MyAppJob extends \Queue\Job {
public $connection;
public function init($context=NULL) {
$this->connecton=$context->get(\My\Connection::class);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.