MGDigital\BusQue\Handler\QueuedCommandHandler::handleQueuedCommand PHP Method

handleQueuedCommand() public method

public handleQueuedCommand ( QueuedCommand $command )
$command MGDigital\BusQue\QueuedCommand
    public function handleQueuedCommand(QueuedCommand $command)
    {
        list($queueName, $id, $serialized) = $this->process($command);
        $this->implementation->getQueueDriver()->queueCommand($queueName, $id, $serialized);
    }

Usage Example

 protected function queueCommand($command, string $id = null)
 {
     $handler = new QueuedCommandHandler($this->implementation);
     $handler->handleQueuedCommand(new QueuedCommand($command, $id ?? 'test_command_id'));
 }
QueuedCommandHandler