1 | <?php |
||
6 | final class Publish |
||
7 | { |
||
8 | private $exchange = ''; |
||
9 | private $routingKey = ''; |
||
10 | private $mandatory = false; |
||
11 | private $immediate = false; |
||
12 | |||
13 | 1 | public function to(string $exchange): self |
|
20 | |||
21 | 1 | public function toDefaultExchange(): self |
|
28 | |||
29 | 1 | public function withRoutingKey(string $key): self |
|
36 | |||
37 | /** |
||
38 | * This will raise an error if the message can't be routed |
||
39 | */ |
||
40 | 1 | public function flagAsMandatory(): self |
|
47 | |||
48 | /** |
||
49 | * This will fail silently if the message can't be routed |
||
50 | */ |
||
51 | 1 | public function flagAsNotMandatory(): self |
|
58 | |||
59 | /** |
||
60 | * This will raise an error if the message can't be delivered immediately |
||
61 | */ |
||
62 | 1 | public function flagAsImmediate(): self |
|
69 | |||
70 | /** |
||
71 | * This will fail silently if the message can't be delivered immediately |
||
72 | */ |
||
73 | 1 | public function flagAsNotImmediate(): self |
|
80 | |||
81 | 2 | public function exchange(): string |
|
85 | |||
86 | 2 | public function routingKey(): string |
|
90 | |||
91 | 2 | public function mandatory(): bool |
|
95 | |||
96 | 2 | public function immediate(): bool |
|
100 | } |
||
101 |