private function createElasticClient($clientName, ContainerBuilder $container)
    {
        // Storage metadata
        $smfName = sprintf('%s.metadata', $clientName);
        $definition = new Definition(
            Utility::getLibraryClass('Search\Elastic\StorageMetadataFactory')
        );
        $definition->setPublic(false);
        $container->setDefinition($smfName, $definition);

        // Client
        return new Definition(
            Utility::getLibraryClass('Search\Elastic\Client'),
            [new Reference($smfName)]
        );
    }
private function createElasticClient($clientName, ContainerBuilder $container)
    {
        // Storage metadata
        $smfName = sprintf('%s.metadata', $clientName);
        $definition = new Definition(
            Utility::getLibraryClass('Search\Elastic\StorageMetadataFactory')
        );
        $definition->setPublic(false);
        $container->setDefinition($smfName, $definition);

        // Client
        return new Definition(
            Utility::getLibraryClass('Search\Elastic\Client'),
            [new Reference($smfName)]
        );
    }
private function createElasticClient ( $ clientName , ContainerBuilder $ container ) { // Storage metadata $ smfName = sprintf ( '%s.metadata' , $ clientName ) ; $ definition = new Definition ( Utility :: getLibraryClass ( 'Search\Elastic\StorageMetadataFactory' ) ) ; $ definition -> setPublic ( false ) ; $ container -> setDefinition ( $ smfName , $ definition ) ; // Client return new Definition ( Utility :: getLibraryClass ( 'Search\Elastic\Client' ) , [ new Reference ( $ smfName ) ] ) ; }
Creates the Elastic search client service definition.
Will also load support services.

@param   string              $clientName
@param   ContainerBuilder    $container
@return  Definition
Creates the Elastic search client service definition . Will also load support services .