PHP code example of geggleto / slimq
1. Go to this page and download the library: Download geggleto/slimq 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/ */
geggleto / slimq example snippets
class MyObject extends \SimpleQueue\Messaging\AbstractAmqpObject {
protected static string $routingKey = 'MyQueue.Cool';
public function getApplicationId(): ?string
{
return 'sf-internal-web';
}
}
class MyHandler implements \SimpleQueue\Messaging\MessageHandler {
public function handle(\SimpleQueue\Messaging\AmqpObjectInterface $object)
{
var_dump($object->getPayload());
}
}