From 23e3ba6db41a312f6db8545be3ed1126bddb393f Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 2 Feb 2011 20:36:54 +0100 Subject: [PATCH] PDO driver: getReflector() is implemented for MySQL and SQLite --- dibi/drivers/pdo.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dibi/drivers/pdo.php b/dibi/drivers/pdo.php index 0a974642..9f2593c4 100644 --- a/dibi/drivers/pdo.php +++ b/dibi/drivers/pdo.php @@ -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; + } }