src/ClientFactory.php
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $configService = $serviceLocator->get('Config');
        $params = [];
        if (isset($configService['elasticsearch'])) {
            $params = $configService['elasticsearch'];
        }

        return new ElasticsearchClient($params);
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $configService = $serviceLocator->get('Config');
        $params = [];
        if (isset($configService['elasticsearch'])) {
            $params = $configService['elasticsearch'];
        }

        return new ElasticsearchClient($params);
    }
public function createService ( ServiceLocatorInterface $ serviceLocator ) { $ configService = $ serviceLocator -> get ( 'Config' ) ; $ params = [ ] ; if ( isset ( $ configService [ 'elasticsearch' ] ) ) { $ params = $ configService [ 'elasticsearch' ] ; } return new ElasticsearchClient ( $ params ) ; }
Create service

@param ServiceLocatorInterface $serviceLocator
@return mixed
Create service