src/Database.php
protected function createClient(array $servers)
    {
        $clients = [];
        foreach ($servers as $key => $server) {
            $clients[$key] = new \Redis();
            $clients[$key]->pconnect($server['host'], $server['port'], 0, $key . $server['database']);

            if (!empty($server['password'])) {
                $clients[$key]->auth($server['password']);
            }

            if (!empty($server['database'])) {
                $clients[$key]->select($server['database']);
            }
        }

        return $clients;
    }
protected function createClient(array $servers)
    {
        $clients = [];
        foreach ($servers as $key => $server) {
            $clients[$key] = new \Redis();
            $clients[$key]->pconnect($server['host'], $server['port'], 0, $key . $server['database']);

            if (!empty($server['password'])) {
                $clients[$key]->auth($server['password']);
            }

            if (!empty($server['database'])) {
                $clients[$key]->select($server['database']);
            }
        }

        return $clients;
    }
protected function createClient ( array $ servers ) { $ clients = [ ] ; foreach ( $ servers as $ key => $ server ) { $ clients [ $ key ] = new \ Redis ( ) ; $ clients [ $ key ] -> pconnect ( $ server [ 'host' ] , $ server [ 'port' ] , 0 , $ key . $ server [ 'database' ] ) ; if ( ! empty ( $ server [ 'password' ] ) ) { $ clients [ $ key ] -> auth ( $ server [ 'password' ] ) ; } if ( ! empty ( $ server [ 'database' ] ) ) { $ clients [ $ key ] -> select ( $ server [ 'database' ] ) ; } } return $ clients ; }
Create an array of connection clients.

@param  array  $servers
@param  array  $options
@return array
Create an array of connection clients .