1 | <?php |
||
10 | final class Driver implements \Bernard\Driver |
||
11 | { |
||
12 | /** |
||
13 | * @var PsrContext |
||
14 | */ |
||
15 | private $context; |
||
16 | |||
17 | /** |
||
18 | * @var PsrConsumer[] |
||
19 | */ |
||
20 | private $consumers; |
||
21 | |||
22 | /** |
||
23 | * @param PsrContext $context |
||
24 | */ |
||
25 | public function __construct(PsrContext $context) |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function listQueues() |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function createQueue($queueName) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function countMessages($queueName) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function pushMessage($queueName, $message) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function popMessage($queueName, $duration = 5) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function acknowledgeMessage($queueName, $receipt) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function peekQueue($queueName, $index = 0, $limit = 20) |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function removeQueue($queueName) |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function info() |
||
118 | |||
119 | /** |
||
120 | * @param string $queueName |
||
121 | * |
||
122 | * @return PsrConsumer |
||
123 | */ |
||
124 | private function getQueueConsumer($queueName) |
||
134 | |||
135 | /** |
||
136 | * @param string $queueName |
||
137 | * |
||
138 | * @return AmqpQueue |
||
139 | */ |
||
140 | private function createAmqpQueue($queueName) |
||
150 | } |
||
151 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.