/** * Create a new Redis driver * * @param mixed $params * @param mixed $options * @param mixed $sentinel_params * @param ClientInterface|null $client */ public function __construct($params = null, $options = null, $sentinel_params = null, ClientInterface $client = null) { if (null === $client) { $this->client = PredisClientFactory::create($params, $options, $sentinel_params); } else { $this->client = $client; } $this->unit_of_work = new UnitOfWork(); }