From 16bc5d7c4aeae2bfda1974d7996028ce1f888fba Mon Sep 17 00:00:00 2001 From: Alin Ilie Date: Tue, 14 Feb 2017 13:17:19 +0200 Subject: [PATCH] Added method getCallback() in BaseConsumer --- RabbitMq/BaseConsumer.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/RabbitMq/BaseConsumer.php b/RabbitMq/BaseConsumer.php index 6763d6b8..56320937 100644 --- a/RabbitMq/BaseConsumer.php +++ b/RabbitMq/BaseConsumer.php @@ -6,23 +6,43 @@ abstract class BaseConsumer extends BaseAmqp implements DequeuerInterface { + /** @var int */ protected $target; + /** @var int */ protected $consumed = 0; + /** @var callable */ protected $callback; + /** @var bool */ protected $forceStop = false; + /** @var int */ protected $idleTimeout = 0; + /** @var int */ protected $idleTimeoutExitCode; + /** + * @param $callback + */ public function setCallback($callback) { $this->callback = $callback; } + /** + * @return callable + */ + public function getCallback() + { + return $this->callback; + } + + /** + * @param int $msgAmount + */ public function start($msgAmount = 0) { $this->target = $msgAmount;