src/phpFastCache/Drivers/Ssdb/Driver.php 1 location
|
@@ 45-54 (lines=10) @@
|
| 42 |
|
* @param array $config |
| 43 |
|
* @throws phpFastCacheDriverException |
| 44 |
|
*/ |
| 45 |
|
public function __construct(array $config = []) |
| 46 |
|
{ |
| 47 |
|
$this->setup($config); |
| 48 |
|
|
| 49 |
|
if (!$this->driverCheck()) { |
| 50 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
| 51 |
|
} elseif (!$this->driverConnect()) { |
| 52 |
|
throw new phpFastCacheDriverException('Ssdb is not connected, cannot continue.'); |
| 53 |
|
} |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
/** |
| 57 |
|
* @return bool |
src/phpFastCache/Drivers/Memcached/Driver.php 1 location
|
@@ 40-51 (lines=12) @@
|
| 37 |
|
* @param array $config |
| 38 |
|
* @throws phpFastCacheDriverException |
| 39 |
|
*/ |
| 40 |
|
public function __construct(array $config = []) |
| 41 |
|
{ |
| 42 |
|
self::checkCollision('Memcached'); |
| 43 |
|
$this->setup($config); |
| 44 |
|
|
| 45 |
|
if (!$this->driverCheck()) { |
| 46 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
| 47 |
|
} else { |
| 48 |
|
$this->instance = new MemcachedSoftware(); |
| 49 |
|
$this->driverConnect(); |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** |
| 54 |
|
* @return bool |
src/phpFastCache/Drivers/Couchbase/Driver.php 1 location
|
@@ 54-63 (lines=10) @@
|
| 51 |
|
* @param array $config |
| 52 |
|
* @throws phpFastCacheDriverException |
| 53 |
|
*/ |
| 54 |
|
public function __construct(array $config = []) |
| 55 |
|
{ |
| 56 |
|
$this->setup($config); |
| 57 |
|
|
| 58 |
|
if (!$this->driverCheck()) { |
| 59 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
| 60 |
|
} else { |
| 61 |
|
$this->driverConnect(); |
| 62 |
|
} |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
/** |
| 66 |
|
* @return bool |
src/phpFastCache/Drivers/Leveldb/Driver.php 1 location
|
@@ 46-55 (lines=10) @@
|
| 43 |
|
* @param array $config |
| 44 |
|
* @throws phpFastCacheDriverException |
| 45 |
|
*/ |
| 46 |
|
public function __construct(array $config = []) |
| 47 |
|
{ |
| 48 |
|
$this->setup($config); |
| 49 |
|
|
| 50 |
|
if (!$this->driverCheck()) { |
| 51 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
| 52 |
|
} else { |
| 53 |
|
$this->driverConnect(); |
| 54 |
|
} |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
/** |
| 58 |
|
* @return string |
src/phpFastCache/Drivers/Predis/Driver.php 1 location
|
@@ 40-49 (lines=10) @@
|
| 37 |
|
* @param array $config |
| 38 |
|
* @throws phpFastCacheDriverException |
| 39 |
|
*/ |
| 40 |
|
public function __construct(array $config = []) |
| 41 |
|
{ |
| 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 |
src/phpFastCache/Drivers/Redis/Driver.php 1 location
|
@@ 40-49 (lines=10) @@
|
| 37 |
|
* @param array $config |
| 38 |
|
* @throws phpFastCacheDriverException |
| 39 |
|
*/ |
| 40 |
|
public function __construct(array $config = []) |
| 41 |
|
{ |
| 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 |
src/phpFastCache/Drivers/Cassandra/Driver.php 1 location
|
@@ 44-53 (lines=10) @@
|
| 41 |
|
* @param array $config |
| 42 |
|
* @throws phpFastCacheDriverException |
| 43 |
|
*/ |
| 44 |
|
public function __construct(array $config = []) |
| 45 |
|
{ |
| 46 |
|
$this->setup($config); |
| 47 |
|
|
| 48 |
|
if (!$this->driverCheck()) { |
| 49 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
| 50 |
|
} else { |
| 51 |
|
$this->driverConnect(); |
| 52 |
|
} |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* @return bool |
src/phpFastCache/Drivers/Mongodb/Driver.php 1 location
|
@@ 52-61 (lines=10) @@
|
| 49 |
|
* @param array $config |
| 50 |
|
* @throws phpFastCacheDriverCheckException |
| 51 |
|
*/ |
| 52 |
|
public function __construct(array $config = []) |
| 53 |
|
{ |
| 54 |
|
$this->setup($config); |
| 55 |
|
|
| 56 |
|
if (!$this->driverCheck()) { |
| 57 |
|
throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName())); |
| 58 |
|
} else { |
| 59 |
|
$this->driverConnect(); |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
/** |
| 64 |
|
* @return bool |