From 788406ecf07e5647d93c9d811b9fc4a9cd3f10f1 Mon Sep 17 00:00:00 2001 From: ramunasd Date: Tue, 30 Jun 2015 12:17:56 +0300 Subject: [PATCH] added method setContentType to producer interface, fixed fallback producer --- RabbitMq/Fallback.php | 14 ++++++++++++++ RabbitMq/ProducerInterface.php | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/RabbitMq/Fallback.php b/RabbitMq/Fallback.php index e946ccaf..2f90f605 100644 --- a/RabbitMq/Fallback.php +++ b/RabbitMq/Fallback.php @@ -2,10 +2,24 @@ namespace OldSound\RabbitMqBundle\RabbitMq; +/** + * Fallback producer for sandbox mode. + */ class Fallback implements ProducerInterface { + /** + * {@inheritDoc} + */ public function publish($msgBody, $routingKey = '', $additionalProperties = array()) { return false; } + + /** + * {@inheritDoc} + */ + public function setContentType($contentType) + { + } } + diff --git a/RabbitMq/ProducerInterface.php b/RabbitMq/ProducerInterface.php index b4e166c1..9580cdd2 100644 --- a/RabbitMq/ProducerInterface.php +++ b/RabbitMq/ProducerInterface.php @@ -12,4 +12,12 @@ interface ProducerInterface * @param array $additionalProperties */ public function publish($msgBody, $routingKey = '', $additionalProperties = array()); + + /** + * Set message content type + * + * @param string $contentType + */ + public function setContentType($contentType); } +