1 | <?php |
||
9 | class Message implements Publishable |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | private $body; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $queueName; |
||
20 | |||
21 | /** |
||
22 | * @var AMQPMessage |
||
23 | */ |
||
24 | private $message; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $exchange; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | private $mandatory; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | private $immediate; |
||
40 | |||
41 | /** |
||
42 | * @var int |
||
43 | */ |
||
44 | private $ticket; |
||
45 | |||
46 | /** |
||
47 | * @var array |
||
48 | */ |
||
49 | private $properties; |
||
50 | |||
51 | /** |
||
52 | * @var int |
||
53 | */ |
||
54 | private $deliveryMode; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | */ |
||
59 | private $delayedExchange; |
||
60 | |||
61 | 3 | public function __construct( |
|
82 | |||
83 | /** |
||
84 | * @return bool |
||
85 | */ |
||
86 | 3 | public function isDelayed() : bool |
|
94 | |||
95 | public function getScheduledAtInSeconds() : int |
||
101 | |||
102 | 2 | public function getMessage() : AMQPMessage |
|
106 | |||
107 | 3 | private function buildProperties(array $properties) : array |
|
122 | |||
123 | 1 | public function getBody() : array |
|
124 | { |
||
125 | 1 | return $this->body; |
|
126 | } |
||
127 | |||
128 | 2 | public function getQueueName() : string |
|
132 | |||
133 | 2 | public function getExchange() : string |
|
137 | |||
138 | 2 | public function isMandatory() : bool |
|
142 | |||
143 | 2 | public function isImmediate() : bool |
|
147 | |||
148 | 2 | public function getTicket() |
|
152 | |||
153 | public function getProperties() : array |
||
157 | |||
158 | 1 | public function getDeliveryMode() : int |
|
159 | { |
||
160 | 1 | return $this->deliveryMode; |
|
161 | } |
||
162 | |||
163 | /** |
||
164 | * @param int $deliveryMode |
||
165 | */ |
||
166 | 1 | public function setDeliveryMode(int $deliveryMode) |
|
167 | { |
||
168 | 1 | $this->deliveryMode = $deliveryMode; |
|
169 | 1 | $this->properties['delivery_mode'] = $this->deliveryMode; |
|
170 | 1 | } |
|
171 | |||
172 | public function getDelayedExchanged() : string |
||
176 | } |
||
177 |