Skip to content

Commit 10317da

Browse files
alinilieskafandri
authored andcommitted
Added method getCallback() in BaseConsumer (#433)
1 parent 20c2f4a commit 10317da

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

RabbitMq/BaseConsumer.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,43 @@
66

77
abstract class BaseConsumer extends BaseAmqp implements DequeuerInterface
88
{
9+
/** @var int */
910
protected $target;
1011

12+
/** @var int */
1113
protected $consumed = 0;
1214

15+
/** @var callable */
1316
protected $callback;
1417

18+
/** @var bool */
1519
protected $forceStop = false;
1620

21+
/** @var int */
1722
protected $idleTimeout = 0;
1823

24+
/** @var int */
1925
protected $idleTimeoutExitCode;
2026

27+
/**
28+
* @param $callback
29+
*/
2130
public function setCallback($callback)
2231
{
2332
$this->callback = $callback;
2433
}
2534

35+
/**
36+
* @return callable
37+
*/
38+
public function getCallback()
39+
{
40+
return $this->callback;
41+
}
42+
43+
/**
44+
* @param int $msgAmount
45+
*/
2646
public function start($msgAmount = 0)
2747
{
2848
$this->target = $msgAmount;

0 commit comments

Comments
 (0)