mirror of
https://github.com/dg/dibi.git
synced 2025-08-08 23:26:49 +02:00
added IDibiDriver::getReflector()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -151,6 +151,12 @@ interface IDibiDriver
|
||||
*/
|
||||
function getResource();
|
||||
|
||||
/**
|
||||
* Returns the connection reflector.
|
||||
* @return IDibiReflector
|
||||
*/
|
||||
function getReflector();
|
||||
|
||||
/**
|
||||
* Encodes data for use in a SQL statement.
|
||||
* @param string value
|
||||
|
Reference in New Issue
Block a user