mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
file dibi.php split to Dibi class and loader dibi.php
This commit is contained in:
@@ -56,9 +56,6 @@ class DibiConnection extends DibiObject
|
||||
*/
|
||||
public function __construct($config, $name = NULL)
|
||||
{
|
||||
class_exists('dibi'); // ensure class dibi is loaded
|
||||
|
||||
// DSN string
|
||||
if (is_string($config)) {
|
||||
parse_str($config, $config);
|
||||
|
||||
@@ -85,7 +82,7 @@ class DibiConnection extends DibiObject
|
||||
|
||||
$class = preg_replace(array('#\W#', '#sql#'), array('_', 'Sql'), ucfirst(strtolower($config['driver'])));
|
||||
$class = "Dibi{$class}Driver";
|
||||
if (!class_exists($class, FALSE)) {
|
||||
if (!class_exists($class)) {
|
||||
include_once dirname(__FILE__) . "/../drivers/$class.php";
|
||||
|
||||
if (!class_exists($class, FALSE)) {
|
||||
@@ -114,7 +111,7 @@ class DibiConnection extends DibiObject
|
||||
$this->onEvent[] = array(new DibiFirePhpLogger($filter), 'logEvent');
|
||||
}
|
||||
|
||||
if (class_exists('DibiNettePanel', FALSE)) {
|
||||
if (class_exists('DibiNettePanel')) {
|
||||
$panel = new DibiNettePanel(isset($profilerCfg['explain']) ? $profilerCfg['explain'] : TRUE, $filter);
|
||||
$panel->register($this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user