concrete/src/Session/SessionFactory.php
private function getRedisServers(array $servers)
    {
        if (!empty($servers)) {
            foreach ($servers as $server) {
                if (isset($server['socket'])) {
                    $server = [
                        'server' => array_get($server, 'socket', ''),
                        'ttl' => array_get($server, 'ttl', null),
                    ];
                } else {
                    $host = array_get($server, 'host', '');
                    // Check for both server/host - fallback due to cache using server
                    $host = !empty($host) ?: array_get($server, 'server', '127.0.0.1');
                    $server = [
                        'server' => $host,
                        'port' => array_get($server, 'port', 11211),
                        'ttl' => array_get($server, 'ttl', null),
                    ];
                }
                yield $server;
            }
        } else {
            yield ['server' => '127.0.0.1', 'port' => '6379', 'ttl' => 0.5];
        }
    }
private function getRedisServers(array $servers)
    {
        if (!empty($servers)) {
            foreach ($servers as $server) {
                if (isset($server['socket'])) {
                    $server = [
                        'server' => array_get($server, 'socket', ''),
                        'ttl' => array_get($server, 'ttl', null),
                    ];
                } else {
                    $host = array_get($server, 'host', '');
                    // Check for both server/host - fallback due to cache using server
                    $host = !empty($host) ?: array_get($server, 'server', '127.0.0.1');
                    $server = [
                        'server' => $host,
                        'port' => array_get($server, 'port', 11211),
                        'ttl' => array_get($server, 'ttl', null),
                    ];
                }
                yield $server;
            }
        } else {
            yield ['server' => '127.0.0.1', 'port' => '6379', 'ttl' => 0.5];
        }
    }
private function getRedisServers ( array $ servers ) { if ( ! empty ( $ servers ) ) { foreach ( $ servers as $ server ) { if ( isset ( $ server [ 'socket' ] ) ) { $ server = [ 'server' => array_get ( $ server , 'socket' , '' ) , 'ttl' => array_get ( $ server , 'ttl' , null ) , ] ; } else { $ host = array_get ( $ server , 'host' , '' ) ; // Check for both server/host - fallback due to cache using server $ host = ! empty ( $ host ) ? : array_get ( $ server , 'server' , '127.0.0.1' ) ; $ server = [ 'server' => $ host , 'port' => array_get ( $ server , 'port' , 11211 ) , 'ttl' => array_get ( $ server , 'ttl' , null ) , ] ; } yield $ server ; } } else { yield [ 'server' => '127.0.0.1' , 'port' => '6379' , 'ttl' => 0.5 ] ; } }
Generator for Redis Array.

@param array $servers The `concrete.session.servers` or `concrete.session.redis.servers` config item

@return \Generator| string[] [ $server, $port, $ttl ]
Generator for Redis Array .