protected function loadPredisConnectionParameters($clientAlias, array $connection, ContainerBuilder $container, $dsn)
    {
        $parametersClass = $container->getParameter('snc_redis.connection_parameters.class');
        $parameterId = sprintf('snc_redis.connection.%s_parameters.%s', $connection['alias'], $clientAlias);

        $parameterDef = new Definition($parametersClass);
        $parameterDef->setPublic(false);
        $parameterDef->setFactory(array(PredisParametersFactory::class, 'create'));
        $parameterDef->addArgument($connection);
        $parameterDef->addArgument($parametersClass);
        $parameterDef->addArgument((string) $dsn);
        $parameterDef->addTag('snc_redis.connection_parameters', array('clientAlias' => $clientAlias));
        $container->setDefinition($parameterId, $parameterDef);
    }
protected function loadPredisConnectionParameters($clientAlias, array $connection, ContainerBuilder $container, $dsn)
    {
        $parametersClass = $container->getParameter('snc_redis.connection_parameters.class');
        $parameterId = sprintf('snc_redis.connection.%s_parameters.%s', $connection['alias'], $clientAlias);

        $parameterDef = new Definition($parametersClass);
        $parameterDef->setPublic(false);
        $parameterDef->setFactory(array(PredisParametersFactory::class, 'create'));
        $parameterDef->addArgument($connection);
        $parameterDef->addArgument($parametersClass);
        $parameterDef->addArgument((string) $dsn);
        $parameterDef->addTag('snc_redis.connection_parameters', array('clientAlias' => $clientAlias));
        $container->setDefinition($parameterId, $parameterDef);
    }
protected function loadPredisConnectionParameters ( $ clientAlias , array $ connection , ContainerBuilder $ container , $ dsn ) { $ parametersClass = $ container -> getParameter ( 'snc_redis.connection_parameters.class' ) ; $ parameterId = sprintf ( 'snc_redis.connection.%s_parameters.%s' , $ connection [ 'alias' ] , $ clientAlias ) ; $ parameterDef = new Definition ( $ parametersClass ) ; $ parameterDef -> setPublic ( false ) ; $ parameterDef -> setFactory ( array ( PredisParametersFactory :: class , 'create' ) ) ; $ parameterDef -> addArgument ( $ connection ) ; $ parameterDef -> addArgument ( $ parametersClass ) ; $ parameterDef -> addArgument ( ( string ) $ dsn ) ; $ parameterDef -> addTag ( 'snc_redis.connection_parameters' , array ( 'clientAlias' => $ clientAlias ) ) ; $ container -> setDefinition ( $ parameterId , $ parameterDef ) ; }
Loads a connection.

@param string               $clientAlias The client alias
@param array                $connection  A connection configuration
@param ContainerBuilder     $container   A ContainerBuilder instance
@param RedisEnvDsn|RedisDsn $dsn         DSN object
Loads a connection .