$hosts =
[$this->redis
];
if ($this->redis instanceof \Predis\ClientInterface
) { $connection =
$this->redis->
getConnection();
if (($connection instanceof ClusterInterface ||
$connection instanceof Predis2ClusterInterface
) &&
$connection instanceof \Traversable
) { $hosts =
[];
foreach ($connection as $c) { $hosts[] =
new \Predis\
Client($c);
} } } elseif ($this->redis instanceof \RedisArray
) { $hosts =
[];
foreach ($this->redis->
_hosts() as $host) { $hosts[] =
$this->redis->
_instance($host);
} } elseif ($this->redis instanceof \RedisCluster
) { $hosts =
[];
foreach ($this->redis->
_masters() as $host) { $hosts[] =
new RedisClusterNodeProxy($host,
$this->redis
);
} } return $hosts;
}}