mirror of
https://github.com/dg/dibi.git
synced 2025-08-30 01:09:50 +02:00
* better syntax highlighting
* all drivers checks for extension in constructor * DibiMySqlDriver - charset is set by mysql_set_charset * DibiMySqliDriver - charset is set by mysqli_set_charset
This commit is contained in:
@@ -51,6 +51,17 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @throws DibiException
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (!extension_loaded('pgsql')) {
|
||||
throw new DibiDriverException("PHP extension 'pgsql' is not loaded");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Connects to a database
|
||||
*
|
||||
@@ -59,10 +70,6 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
|
||||
*/
|
||||
public function connect(array &$config)
|
||||
{
|
||||
if (!extension_loaded('pgsql')) {
|
||||
throw new DibiException("PHP extension 'pgsql' is not loaded");
|
||||
}
|
||||
|
||||
if (isset($config['string'])) {
|
||||
$string = $config['string'];
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user