/** * Set pre-created Memcache driver. * * @param DriverInterface $driver Pre-created driver instance. * @param bool $connect Force connection. */ protected function setDriver(DriverInterface $driver, $connect = false) { $this->driver = $driver; if ($connect) { $this->driver->connect(); } }