| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function __construct($host, $password = null, $port = 6379, $prefix = 'PHPProm:', $dbIndex = null) { |
||
| 19 | $this->redis = new \Redis(); |
||
| 20 | $this->redis->connect($host, $port); |
||
| 21 | if ($password !== null) { |
||
| 22 | $this->redis->auth($password); |
||
| 23 | } |
||
| 24 | if ($dbIndex !== null) { |
||
| 25 | $this->redis->select($dbIndex); |
||
| 26 | } |
||
| 27 | $this->redis->setOption(\Redis::OPT_PREFIX, $prefix); |
||
| 28 | } |
||
| 29 | |||
| 45 |