1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 13:47:33 +02:00

PDO driver: getReflector() is implemented for MySQL and SQLite

This commit is contained in:
David Grudl
2011-02-02 20:36:54 +01:00
parent bdb5b217c7
commit 23e3ba6db4

View File

@@ -12,6 +12,10 @@
*/
require_once dirname(__FILE__) . '/mysql.reflector.php';
require_once dirname(__FILE__) . '/sqlite.reflector.php';
/**
* The dibi driver for PDO.
*
@@ -217,7 +221,17 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
*/
public function getReflector()
{
throw new NotSupportedException;
switch ($this->driverName) {
case 'mysql':
return new DibiMySqlReflector($this);
case 'sqlite':
case 'sqlite2':
return new DibiSqliteReflector($this);
default:
throw new NotSupportedException;
}
}