Permalink
Browse files

Merge pull request #26 from richardfullmer/extension-fixes

Fixed some typo's and logic errors inside the Extension
  • Loading branch information...
2 parents 7d883c3 + f2a2bb0 commit f6445361c8abef57eed0f15febe596b35e8a266b @videlalvaro videlalvaro committed Mar 7, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 DependencyInjection/OldSoundRabbitMqExtension.php
@@ -99,8 +99,8 @@ protected function loadAnonConsumers()
if ($this->config['debug']) {
$this->injectLoggedChannel($definition, $key, $anon['connection']);
}
- $definition->addMethodCall('setExchangeOptions', array($consumer['exchange_options']));
- $definition->addMethodCall('setCallback', array(array(new Reference($consumer['callback']), 'execute')));
+ $definition->addMethodCall('setExchangeOptions', array($anon['exchange_options']));
+ $definition->addMethodCall('setCallback', array(array(new Reference($anon['callback']), 'execute')));
$this->container->setDefinition(sprintf('old_sound_rabbit_mq.%s_anon', $key), $definition);
}
@@ -111,10 +111,11 @@ protected function loadRpcClients()
foreach ($this->config['rpc_clients'] as $key => $client) {
$definition = new Definition($this->container->getParameter('old_sound_rabbit_mq.rpc_client.class'));
+ $this->injectConnection($definition, $client['connection']);
if ($this->config['debug']) {
$this->injectLoggedChannel($definition, $key, $client['connection']);
}
- $this->injectConnection($definition, $client['connection']);
+
$definition->addMethodCall('initClient');
$this->container->setDefinition(sprintf('old_sound_rabbit_mq.%s_rpc', $key), $definition);
}
@@ -130,7 +131,7 @@ protected function loadRpcServers()
$this->injectLoggedChannel($definition, $key, $server['connection']);
}
- $definition->addMethodCall('initServer', array($server['alias']));
+ $definition->addMethodCall('initServer', array($key));
$definition->addMethodCall('setCallback', array(array(new Reference($server['callback']), 'execute')));
$this->container->setDefinition(sprintf('old_sound_rabbit_mq.%s_server', $key), $definition);

0 comments on commit f644536

Please sign in to comment.