mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
PDO driver: getReflector() is implemented for MySQL and SQLite
This commit is contained in:
@@ -12,6 +12,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
require_once dirname(__FILE__) . '/mysql.reflector.php';
|
||||||
|
require_once dirname(__FILE__) . '/sqlite.reflector.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The dibi driver for PDO.
|
* The dibi driver for PDO.
|
||||||
*
|
*
|
||||||
@@ -217,8 +221,18 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getReflector()
|
public function getReflector()
|
||||||
{
|
{
|
||||||
|
switch ($this->driverName) {
|
||||||
|
case 'mysql':
|
||||||
|
return new DibiMySqlReflector($this);
|
||||||
|
|
||||||
|
case 'sqlite':
|
||||||
|
case 'sqlite2':
|
||||||
|
return new DibiSqliteReflector($this);
|
||||||
|
|
||||||
|
default:
|
||||||
throw new NotSupportedException;
|
throw new NotSupportedException;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user