dev-master
9999999-devWhiteRabbit - Simple Library to push/pull RabbitMQ in PHP with PHPAMQPLib PHP Version 5
GPL-3.0
The Requires
- php >=5.3.0
- php-amqplib/php-amqplib 2.7.2
by Di Sarli
Wallogit.com
2017 © Pedro Peláez
WhiteRabbit - Simple Library to push/pull RabbitMQ in PHP with PHPAMQPLib PHP Version 5
WhiteRabbit Class - Simple Library to use RabbitMQ in PHP with PHPAMQPLib PHP Version 5, (*1)
1.0.0, (*2)
These instructions will get you install the lib and running on your project for development and testing purposes., (*3)
What things you need to install the software, (*4)
PHP 5.3, (*5)
Require via composer, (*6)
composer require disarli/white-rabbit
Install via composer, (*7)
composer install
On your project load the library, (*8)
use DiSarli\WhiteRabbit\WhiteRabbit;
Construct with your config data, (*9)
$config = [
'host' => 'localhost',
'port' => '5672',
'user' => 'username',
'pass' => 'pass',
'vhost' => '/',
];
$rabbitmq = new WhiteRabbit($config);
Use your choosen method, (*10)
$rabbitmq->push('test_queue', $data, false, [], true);
The list bellow is quick help to primary methods, (*11)
Push in the specified queue, (*12)
$this->rabbitmq->push('queue', $content, true, [], false);
@param string $queue - Queue
@param mixed (string/array) $data - Data
@param boolean $permanent - Permanent mode
@param array $params - Parameters
@param bool $output - Show output
@return bool
Get items from the specified queue, (*13)
$this->rabbitmq->pull('queue', true, []);
@param string $queue - Queue
@param bool $permanent - Permanent mode
@param array $callback - Callback
@return void
I use SemVer for versioning., (*14)
This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE.md file for details, (*15)
WhiteRabbit - Simple Library to push/pull RabbitMQ in PHP with PHPAMQPLib PHP Version 5
GPL-3.0