PHP code example of abc / job-worker-bundle

1. Go to this page and download the library: Download abc/job-worker-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/ */

    

abc / job-worker-bundle example snippets


interface ProcessorInterface
{
    public function process(?string $input, Context $context);
}



namespace App;

use Abc\Job\RouteProviderInterface;

class JobRoutes implements RouteProviderInterface
{
    public static function getRoutes()
    {
        return [
            [
                'name' => 'job_A',
                'queue' => 'queue_A',
                'replyTo' => 'reply_default',
            ],
            [
                'name' => 'job_B',
                'queue' => 'queue_B',
                'replyTo' => 'reply_default',
            ],
            [
                'name' => 'job_C',
                'queue' => 'queue_B',
                'replyTo' => 'reply_C',
            ],
        ];
    }
}