1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/11015] Make DBAL classes autoloadable

PHPBB3-11015

This allows us to just create the object without having to include the
driver first. However, it also means that users must specify the full
class name in config.php
This commit is contained in:
Igor Wiedler
2012-07-21 17:43:43 +02:00
parent f7f78adeb9
commit 90a957ad26
26 changed files with 1129 additions and 1189 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -15,14 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* Firebird/Interbase Database Abstraction Layer
* Minimum Requirement is Firebird 2.1
* @package dbal
*/
class dbal_firebird extends dbal
class phpbb_db_driver_firebird extends phpbb_db_driver
{
var $last_query_text = '';
var $service_handle = false;

View File

@@ -15,14 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* MSSQL Database Abstraction Layer
* Minimum Requirement is MSSQL 2000+
* @package dbal
*/
class dbal_mssql extends dbal
class phpbb_db_driver_mssql extends phpbb_db_driver
{
/**
* Connect to server
@@ -374,7 +372,7 @@ class dbal_mssql extends dbal
FROM master.dbo.sysmessages
WHERE error = ' . $error['code'];
$result_id = @mssql_query($sql);
if ($result_id)
{
$row = @mssql_fetch_assoc($result_id);

View File

@@ -15,8 +15,6 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* Unified ODBC functions
* Unified ODBC functions support any database having ODBC driver, for example Adabas D, IBM DB2, iODBC, Solid, Sybase SQL Anywhere...
@@ -28,7 +26,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
*
* @package dbal
*/
class dbal_mssql_odbc extends dbal
class phpbb_db_driver_mssql_odbc extends phpbb_db_driver
{
var $last_query_text = '';

View File

@@ -19,8 +19,6 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* Prior to version 1.1 the SQL Server Native PHP driver didn't support sqlsrv_num_rows, or cursor based seeking so we recall all rows into an array
* and maintain our own cursor index into that array.
@@ -193,7 +191,7 @@ class result_mssqlnative
/**
* @package dbal
*/
class dbal_mssqlnative extends dbal
class phpbb_db_driver_mssqlnative extends phpbb_db_driver
{
var $m_insert_id = NULL;
var $last_query_text = '';

View File

@@ -15,8 +15,6 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* MySQL4 Database Abstraction Layer
* Compatible with:
@@ -26,7 +24,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
* MySQL 5.0+
* @package dbal
*/
class dbal_mysql extends dbal
class phpbb_db_driver_mysql extends phpbb_db_driver
{
var $multi_insert = true;

View File

@@ -15,15 +15,13 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* MySQLi Database Abstraction Layer
* mysqli-extension has to be compiled with:
* MySQL 4.1+ or MySQL 5.0+
* @package dbal
*/
class dbal_mysqli extends dbal
class phpbb_db_driver_mysqli extends phpbb_db_driver
{
var $multi_insert = true;

View File

@@ -15,13 +15,11 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* Oracle Database Abstraction Layer
* @package dbal
*/
class dbal_oracle extends dbal
class phpbb_db_driver_oracle extends phpbb_db_driver
{
var $last_query_text = '';

View File

@@ -15,19 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
if (!class_exists('phpbb_error_collector'))
{
include($phpbb_root_path . 'includes/error_collector.' . $phpEx);
}
/**
* PostgreSQL Database Abstraction Layer
* Minimum Requirement is Version 7.3+
* @package dbal
*/
class dbal_postgres extends dbal
class phpbb_db_driver_postgres extends phpbb_db_driver
{
var $last_query_text = '';
var $connect_error = '';

View File

@@ -15,14 +15,12 @@ if (!defined('IN_PHPBB'))
exit;
}
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
/**
* Sqlite Database Abstraction Layer
* Minimum Requirement: 2.8.2+
* @package dbal
*/
class dbal_sqlite extends dbal
class phpbb_db_driver_sqlite extends phpbb_db_driver
{
/**
* Connect to server