@@ 70-84 (lines=15) @@ | ||
67 | return $this; |
|
68 | } |
|
69 | ||
70 | private function registerExchanges( |
|
71 | array $config, |
|
72 | ContainerBuilder $container |
|
73 | ): self { |
|
74 | $autoDeclare = $container->getDefinition('innmind.amqp.client.auto_declare'); |
|
75 | ||
76 | foreach ($config['exchanges'] as $name => $exchange) { |
|
77 | $autoDeclare->addMethodCall( |
|
78 | 'declareExchange', |
|
79 | [$name, $exchange['type'], $exchange['durable'], $exchange['arguments']] |
|
80 | ); |
|
81 | } |
|
82 | ||
83 | return $this; |
|
84 | } |
|
85 | ||
86 | private function registerQueues( |
|
87 | array $config, |
|
@@ 107-121 (lines=15) @@ | ||
104 | return $this; |
|
105 | } |
|
106 | ||
107 | private function registerBindings( |
|
108 | array $config, |
|
109 | ContainerBuilder $container |
|
110 | ): self { |
|
111 | $autoDeclare = $container->getDefinition('innmind.amqp.client.auto_declare'); |
|
112 | ||
113 | foreach ($config['bindings'] as $binding) { |
|
114 | $autoDeclare->addMethodCall( |
|
115 | 'declareBinding', |
|
116 | [$binding['exchange'], $binding['queue'], $binding['routingKey'], $binding['arguments']] |
|
117 | ); |
|
118 | } |
|
119 | ||
120 | return $this; |
|
121 | } |
|
122 | ||
123 | private function registerProducers( |
|
124 | array $config, |