@@ 5-58 (lines=54) @@ | ||
2 | ||
3 | namespace Portiny\RabbitMQ\Exchange; |
|
4 | ||
5 | final class ExchangeBind |
|
6 | { |
|
7 | /** |
|
8 | * @var string |
|
9 | */ |
|
10 | private $destination; |
|
11 | ||
12 | /** |
|
13 | * @var string |
|
14 | */ |
|
15 | private $routingKey; |
|
16 | ||
17 | /** |
|
18 | * @var bool |
|
19 | */ |
|
20 | private $nowait = false; |
|
21 | ||
22 | /** |
|
23 | * @var array |
|
24 | */ |
|
25 | private $arguments = []; |
|
26 | ||
27 | public function __construct( |
|
28 | string $destination, |
|
29 | string $routingKey = '', |
|
30 | bool $nowait = false, |
|
31 | array $arguments = [] |
|
32 | ) { |
|
33 | $this->destination = $destination; |
|
34 | $this->routingKey = $routingKey; |
|
35 | $this->nowait = $nowait; |
|
36 | $this->arguments = $arguments; |
|
37 | } |
|
38 | ||
39 | public function getDestination(): string |
|
40 | { |
|
41 | return $this->destination; |
|
42 | } |
|
43 | ||
44 | public function getRoutingKey(): string |
|
45 | { |
|
46 | return $this->routingKey; |
|
47 | } |
|
48 | ||
49 | public function isNowait(): bool |
|
50 | { |
|
51 | return $this->nowait; |
|
52 | } |
|
53 | ||
54 | public function getArguments(): array |
|
55 | { |
|
56 | return $this->arguments; |
|
57 | } |
|
58 | } |
|
59 |
@@ 5-54 (lines=50) @@ | ||
2 | ||
3 | namespace Portiny\RabbitMQ\Queue; |
|
4 | ||
5 | final class QueueBind |
|
6 | { |
|
7 | /** |
|
8 | * @var string |
|
9 | */ |
|
10 | private $exchange; |
|
11 | ||
12 | /** |
|
13 | * @var string |
|
14 | */ |
|
15 | private $routingKey; |
|
16 | ||
17 | /** |
|
18 | * @var bool |
|
19 | */ |
|
20 | private $nowait = false; |
|
21 | ||
22 | /** |
|
23 | * @var array |
|
24 | */ |
|
25 | private $arguments = []; |
|
26 | ||
27 | public function __construct(string $exchange, string $routingKey = '', bool $nowait = false, array $arguments = []) |
|
28 | { |
|
29 | $this->exchange = $exchange; |
|
30 | $this->routingKey = $routingKey; |
|
31 | $this->nowait = $nowait; |
|
32 | $this->arguments = $arguments; |
|
33 | } |
|
34 | ||
35 | public function getExchange(): string |
|
36 | { |
|
37 | return $this->exchange; |
|
38 | } |
|
39 | ||
40 | public function getRoutingKey(): string |
|
41 | { |
|
42 | return $this->routingKey; |
|
43 | } |
|
44 | ||
45 | public function isNowait(): bool |
|
46 | { |
|
47 | return $this->nowait; |
|
48 | } |
|
49 | ||
50 | public function getArguments(): array |
|
51 | { |
|
52 | return $this->arguments; |
|
53 | } |
|
54 | } |
|
55 |