src/phpFastCache/Drivers/Ssdb/Driver.php 1 location
|
@@ 43-52 (lines=10) @@
|
40 |
|
* @param array $config |
41 |
|
* @throws phpFastCacheDriverException |
42 |
|
*/ |
43 |
|
public function __construct(array $config = []) |
44 |
|
{ |
45 |
|
$this->setup($config); |
46 |
|
|
47 |
|
if (!$this->driverCheck()) { |
48 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
49 |
|
} elseif (!$this->driverConnect()) { |
50 |
|
throw new phpFastCacheDriverException('Ssdb is not connected, cannot continue.'); |
51 |
|
} |
52 |
|
} |
53 |
|
|
54 |
|
/** |
55 |
|
* @return bool |
src/phpFastCache/Drivers/Memcached/Driver.php 1 location
|
@@ 39-49 (lines=11) @@
|
36 |
|
* @param array $config |
37 |
|
* @throws phpFastCacheDriverException |
38 |
|
*/ |
39 |
|
public function __construct(array $config = []) |
40 |
|
{ |
41 |
|
self::checkCollision('Memcached'); |
42 |
|
$this->setup($config); |
43 |
|
|
44 |
|
if (!$this->driverCheck()) { |
45 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
46 |
|
} else { |
47 |
|
$this->driverConnect(); |
48 |
|
} |
49 |
|
} |
50 |
|
|
51 |
|
/** |
52 |
|
* @return bool |