/** This sets the db. It will normally be call in the boot process * * @param array config array ***/ public static function init(&$config) { //currently mysqli is handled by the mysql class if ($config['Database']['dbtype'] == 'mysqli') { self::$dbtype = 'MYSQL'; } else { self::$dbtype = strtoupper($config['Database']['dbtype']); } $class = 'vB_dB_' . self::$dbtype . '_Assertor'; if (class_exists($class)) { self::$instance = new $class($config); } vB_Shutdown::instance()->add(array(self::$instance, 'executeShutdownQueries')); }