| Conditions | 4 |
| Paths | 5 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function __construct($_options = []) |
||
| 20 | { |
||
| 21 | if (!class_exists('Memcache')) { |
||
| 22 | throw new \Millennium\Cache\Exceptions\DriverNotFoundException('Memcached not installed on your system'); |
||
| 23 | } |
||
| 24 | $options = array_merge(['host' => '127.0.0.1', 'port' => '11211'], $_options); |
||
| 25 | $this->memcache = new \Memcache(); |
||
| 26 | $this->memcache->connect($options['host'], $options['port']); |
||
| 27 | $this->expire = isset($options['expire']) && ctype_digit($options['expire']) ? $options['expire'] : 3600; |
||
| 28 | } |
||
| 29 | |||
| 49 |