src/adapters/MySQLConnection.php 1 location
|
@@ 18-29 (lines=12) @@
|
| 15 |
|
use yolk\database\DSN;
|
| 16 |
|
use yolk\database\exceptions\ConfigurationException;
|
| 17 |
|
|
| 18 |
|
class MySQLConnection extends BaseConnection {
|
| 19 |
|
|
| 20 |
|
public function __construct( DSN $dsn ) {
|
| 21 |
|
|
| 22 |
|
if( !$dsn->isMySQL() )
|
| 23 |
|
throw new ConfigurationException(sprintf("\\%s expects a DSN of type '%s', '%s' given", __CLASS__, DSN::TYPE_MYSQL, $dsn->type));
|
| 24 |
|
|
| 25 |
|
parent::__construct($dsn);
|
| 26 |
|
|
| 27 |
|
}
|
| 28 |
|
|
| 29 |
|
}
|
| 30 |
|
|
| 31 |
|
// EOF |
src/adapters/PgSQLConnection.php 1 location
|
@@ 18-29 (lines=12) @@
|
| 15 |
|
use yolk\database\DSN;
|
| 16 |
|
use yolk\database\exceptions\ConfigurationException;
|
| 17 |
|
|
| 18 |
|
class PgSQLConnection extends BaseConnection {
|
| 19 |
|
|
| 20 |
|
public function __construct( DSN $dsn ) {
|
| 21 |
|
|
| 22 |
|
if( !$dsn->isPgSQL() )
|
| 23 |
|
throw new ConfigurationException(sprintf("\\%s expects a DSN of type '%s', '%s' given", __CLASS__, DSN::TYPE_PGSQL, $dsn->type));
|
| 24 |
|
|
| 25 |
|
parent::__construct($dsn);
|
| 26 |
|
|
| 27 |
|
}
|
| 28 |
|
|
| 29 |
|
}
|
| 30 |
|
|
| 31 |
|
// EOF |
src/adapters/SQLiteConnection.php 1 location
|
@@ 18-29 (lines=12) @@
|
| 15 |
|
use yolk\database\DSN;
|
| 16 |
|
use yolk\database\exceptions\ConfigurationException;
|
| 17 |
|
|
| 18 |
|
class SQLiteConnection extends BaseConnection {
|
| 19 |
|
|
| 20 |
|
public function __construct( DSN $dsn ) {
|
| 21 |
|
|
| 22 |
|
if( !$dsn->isSQLite() )
|
| 23 |
|
throw new ConfigurationException(sprintf("\\%s expects a DSN of type '%s', '%s' given", __CLASS__, DSN::TYPE_SQLITE, $dsn->type));
|
| 24 |
|
|
| 25 |
|
parent::__construct($dsn);
|
| 26 |
|
|
| 27 |
|
}
|
| 28 |
|
|
| 29 |
|
}
|
| 30 |
|
|
| 31 |
|
// EOF |