1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 06:07:39 +02:00

added IDibiDriver::getReflector()

This commit is contained in:
David Grudl
2010-08-05 21:03:08 +02:00
parent 9f982cb310
commit 65b5e2eecd
12 changed files with 118 additions and 4 deletions

View File

@@ -664,11 +664,8 @@ class DibiConnection extends DibiObject
*/
public function getDatabaseInfo()
{
if (!($this->driver instanceof IDibiReflector)) {
throw new NotSupportedException('Driver '. get_class($this->driver) . ' has not reflection capabilities.');
}
$this->connected || $this->connect();
return new DibiDatabaseInfo($this->driver, isset($this->config['database']) ? $this->config['database'] : NULL);
return new DibiDatabaseInfo($this->driver->getReflector(), isset($this->config['database']) ? $this->config['database'] : NULL);
}