public static function init($dbConf = false) { include __DIR__ . '/../config.php'; try { $current = preg_split('/\\:/', $current); if (count($current) < 2 || !isset($db[$current[0]][$current[1]])) { self::$dbErrMsg = ErrorCatcher::errorMsg('config_error'); throw new ErrorCatcher(self::$dbErrMsg); } } catch (ErrorCatcher $e) { $excParm['e'] = $e; echo ErrorCatcher::fire($excParm); } self::$driver = $current[0]; $currentConf = $db[$current[0]][$current[1]]; if (!$dbConf) { if (is_null(self::$dbconf)) { self::$dbconf = $currentConf; self::$driver = ucfirst(self::$driver); $_driver = 'Db\\drivers\\My\\' . self::$driver; $_driver::init($currentConf); } } else { self::$dbconf = $config; } }