| 1 | <?php |
||
| 11 | class RedisMessagePublisher implements MessagePublisherInterface |
||
| 12 | { |
||
| 13 | private $channel; |
||
| 14 | private $exchange; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param \Redis $channel |
||
| 18 | * @param string $exchange |
||
| 19 | */ |
||
| 20 | public function __construct(\Redis $channel, $exchange) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * publish. |
||
| 28 | * |
||
| 29 | * @param Message $message The message to publish |
||
| 30 | * @param string $key A routing key to use |
||
| 31 | */ |
||
| 32 | public function publish(Message $message, $key = null) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * getExchangeName. |
||
| 39 | * |
||
| 40 | * Return the name of the exchange where the message will be published |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function getExchangeName() |
||
| 48 | } |
||
| 49 |