PHP code example of ride / lib-queue-beanstalkd

1. Go to this page and download the library: Download ride/lib-queue-beanstalkd 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/ */

    

ride / lib-queue-beanstalkd example snippets




use ride\library\queue\BeanstalkdFactory;
use ride\library\queue\BeanstalkdQueueManager;

function createQueueManager() {
    $factory = new BeanstalkdFactory();
    
    $client = $factory->createClient('localhost', 11300);
    
    $queueManager = new BeanstalkdQueueManager($client);
    
    return $queueManager;
}