PHP code example of lucassaraiva5 / queue-bundle

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

    

lucassaraiva5 / queue-bundle example snippets

 php
public function registerBundles()
{
    $bundles = [
        // ...
        new lucassaraiva5\QueueBundle\SymfonyBundlesQueueBundle(),
        // ...
    ];
    ...
}
 php
$queue = $this->get('ls5_queue'); // get the service

// adding some data to queue
$queue->push('User "demo" registered');
$queue->push(1234567890);
$queue->push(new \stdClass);

// get count of items from queue
$queue->count(); // returns integer: 3