| @@ 278-296 (lines=19) @@ | ||
| 275 | * |
|
| 276 | * @return array |
|
| 277 | */ |
|
| 278 | private static function getMessageProperties(Message $message) |
|
| 279 | { |
|
| 280 | $properties = [ |
|
| 281 | self::DELIVERY_MODE => 2, |
|
| 282 | self::CONTENT_TYPE => 'text/plain', |
|
| 283 | self::APPLICATION_HEADERS => $message->getHeaders() |
|
| 284 | ]; |
|
| 285 | ||
| 286 | if ($message->getCorrelationId() !== null) { |
|
| 287 | $properties[self::CORRELATION_ID] = $message->getCorrelationId(); |
|
| 288 | ||
| 289 | } |
|
| 290 | ||
| 291 | if ($message->getReplyTo() !== null) { |
|
| 292 | $properties[self::REPLY_TO] = $message->getReplyTo(); |
|
| 293 | } |
|
| 294 | ||
| 295 | return $properties; |
|
| 296 | } |
|
| 297 | } |
|
| 298 | ||
| @@ 268-286 (lines=19) @@ | ||
| 265 | * |
|
| 266 | * @return array |
|
| 267 | */ |
|
| 268 | private static function getMessageProperties(Message $message) |
|
| 269 | { |
|
| 270 | $properties = [ |
|
| 271 | self::DELIVERY_MODE => 2, |
|
| 272 | self::CONTENT_TYPE => 'text/plain', |
|
| 273 | self::APPLICATION_HEADERS => new AMQPTable($message->getHeaders()) |
|
| 274 | ]; |
|
| 275 | ||
| 276 | if ($message->getCorrelationId() !== null) { |
|
| 277 | $properties[self::CORRELATION_ID] = $message->getCorrelationId(); |
|
| 278 | ||
| 279 | } |
|
| 280 | ||
| 281 | if ($message->getReplyTo() !== null) { |
|
| 282 | $properties[self::REPLY_TO] = $message->getReplyTo(); |
|
| 283 | } |
|
| 284 | ||
| 285 | return $properties; |
|
| 286 | } |
|
| 287 | ||
| 288 | /** |
|
| 289 | * @param AMQPMessage $message |
|