1 | <?php |
||
2 | |||
3 | namespace TraderInteractive\Mongo; |
||
4 | |||
5 | /** |
||
6 | * Trait for QueueAwareInterface implementation. |
||
7 | */ |
||
8 | trait QueueAwareTrait |
||
9 | { |
||
10 | /** |
||
11 | * The mongoQueue instance. |
||
12 | * |
||
13 | * @var QueueInterface |
||
14 | */ |
||
15 | private $mongoQueue; |
||
16 | |||
17 | /** |
||
18 | * Returns the Queue instance. |
||
19 | * |
||
20 | * @return QueueInterface |
||
21 | */ |
||
22 | public function getQueue() : QueueInterface |
||
23 | { |
||
24 | return $this->mongoQueue; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Sets the Queue instance. |
||
29 | * |
||
30 | * @param QueueInterface $mongoQueue |
||
31 | * |
||
32 | * @return QueueAwareInterface |
||
33 | */ |
||
34 | public function setQueue(QueueInterface $mongoQueue) |
||
35 | { |
||
36 | $this->mongoQueue = $mongoQueue; |
||
37 | return $this; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
38 | } |
||
39 | } |
||
40 |