protected function clientSettings(array $configs, ContainerBuilder $container)
    {
        foreach($configs as $key => $infos){
            $clientDefinition = new Definition();
            $clientDefinition->setClass($infos['class']);
            
            $hostsSettings = $this->hostSettings($infos);
            $logPathSettings = $this->logPathSettings($infos);
            $logLevelSettings = $this->logLevelSettings($infos);
            
            $options = array(
                            'hosts' => $hostsSettings,
                            'logPath' => $logPathSettings,
                            'logLevel' => $logLevelSettings
                            );
            
            $clientDefinition->setArguments(array($options));
            
            $clientServiceId = 'ushios_elastic_search_client';
            if ($key == 'default'){
                $container->setDefinition($clientServiceId, $clientDefinition);
                $clientServiceId = $clientServiceId.'.default';
            }else{
                $clientServiceId = $clientServiceId.'.'.$key;
            }
    
            $container->setDefinition($clientServiceId, $clientDefinition);
        }
    }
protected function clientSettings(array $configs, ContainerBuilder $container)
    {
        foreach($configs as $key => $infos){
            $clientDefinition = new Definition();
            $clientDefinition->setClass($infos['class']);
            
            $hostsSettings = $this->hostSettings($infos);
            $logPathSettings = $this->logPathSettings($infos);
            $logLevelSettings = $this->logLevelSettings($infos);
            
            $options = array(
                            'hosts' => $hostsSettings,
                            'logPath' => $logPathSettings,
                            'logLevel' => $logLevelSettings
                            );
            
            $clientDefinition->setArguments(array($options));
            
            $clientServiceId = 'ushios_elastic_search_client';
            if ($key == 'default'){
                $container->setDefinition($clientServiceId, $clientDefinition);
                $clientServiceId = $clientServiceId.'.default';
            }else{
                $clientServiceId = $clientServiceId.'.'.$key;
            }
    
            $container->setDefinition($clientServiceId, $clientDefinition);
        }
    }
protected function clientSettings ( array $ configs , ContainerBuilder $ container ) { foreach ( $ configs as $ key => $ infos ) { $ clientDefinition = new Definition ( ) ; $ clientDefinition -> setClass ( $ infos [ 'class' ] ) ; $ hostsSettings = $ this -> hostSettings ( $ infos ) ; $ logPathSettings = $ this -> logPathSettings ( $ infos ) ; $ logLevelSettings = $ this -> logLevelSettings ( $ infos ) ; $ options = array ( 'hosts' => $ hostsSettings , 'logPath' => $ logPathSettings , 'logLevel' => $ logLevelSettings ) ; $ clientDefinition -> setArguments ( array ( $ options ) ) ; $ clientServiceId = 'ushios_elastic_search_client' ; if ( $ key == 'default' ) { $ container -> setDefinition ( $ clientServiceId , $ clientDefinition ) ; $ clientServiceId = $ clientServiceId . '.default' ; } else { $ clientServiceId = $ clientServiceId . '.' . $ key ; } $ container -> setDefinition ( $ clientServiceId , $ clientDefinition ) ; } }
Reading the config.yml for aws-sdk client.
@param array $configs
@param ContainerBuilder $container
Reading the config . yml for aws - sdk client .