Completed
Push — 1.1 ( 12efad )
by David
02:09
created

DefaultExchange::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
4
namespace Mouf\AmqpClient\Objects;
5
6
7
use Mouf\AmqpClient\Client;
8
use PhpAmqpLib\Channel\AMQPChannel;
9
10
/**
11
 * The RabbitMQ default exchange will automatically send messages to the queue whose key is the key of the message.
12
 * This is RabbitMQ specific.
13
 */
14
class DefaultExchange extends Exchange
15
{
16
    public function __construct(Client $client)
17
    {
18
        parent::__construct($client, '', 'direct');
19
    }
20
21
    public function init(AMQPChannel $amqpChannel)
22
    {
23
        // Let's do nothing. The default exchange already exists and cannot be overwritten.
24
    }
25
}