Update to latest version of Elastica
This commit is contained in:
parent
743b2c0e64
commit
5df741ba82
|
@ -45,6 +45,8 @@ class Configuration
|
|||
->children()
|
||||
->scalarNode('host')->defaultValue('localhost')->end()
|
||||
->scalarNode('port')->defaultValue('9000')->end()
|
||||
->scalarNode('timeout')->end()
|
||||
->scalarNode('headers')->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
|
|
|
@ -63,12 +63,8 @@ class FOQElasticaExtension extends Extension
|
|||
protected function loadClients(array $clients, ContainerBuilder $container)
|
||||
{
|
||||
$clientIds = array();
|
||||
foreach ($clients as $name => $client) {
|
||||
$clientDefArgs = array(
|
||||
isset($client['host']) ? $client['host'] : null,
|
||||
isset($client['port']) ? $client['port'] : array(),
|
||||
);
|
||||
$clientDef = new Definition('%foq_elastica.client.class%', $clientDefArgs);
|
||||
foreach ($clients as $name => $clientConfig) {
|
||||
$clientDef = new Definition('%foq_elastica.client.class%', array($clientConfig));
|
||||
$clientId = sprintf('foq_elastica.client.%s', $name);
|
||||
$container->setDefinition($clientId, $clientDef);
|
||||
$clientIds[$name] = $clientId;
|
||||
|
|
Loading…
Reference in a new issue