1 | <?php |
||
17 | class RabbitmqDriver implements DriverInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var AMQPChannel |
||
21 | */ |
||
22 | private $channel; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $queuesDeclared; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | private $timeout; |
||
33 | |||
34 | 7 | public function __construct(AbstractChannel $channel, int $timeout = 0) |
|
40 | |||
41 | /** |
||
42 | * @return AMQPChannel |
||
43 | */ |
||
44 | 7 | public function getChannel(): AMQPChannel |
|
48 | |||
49 | /** |
||
50 | * @return int |
||
51 | */ |
||
52 | 5 | public function getTimeout(): int |
|
56 | |||
57 | /** |
||
58 | * @inheritdoc |
||
59 | */ |
||
60 | 5 | public function send(string $name, string $message): bool |
|
73 | |||
74 | /** |
||
75 | * @inheritdoc |
||
76 | */ |
||
77 | 6 | public function receive(string $name, callable $handler) |
|
102 | |||
103 | 7 | private function declareQueue(string $name) |
|
113 | } |