diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2010-08-31 21:26:50 +0200 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-09-17 14:08:14 +0200 |
| commit | 456de639123ae3da6320bed6140ab69ac9925e74 (patch) | |
| tree | 599778c0a452f6180de82e13288f7b7ed8e686ac /phpBB/common.php | |
| parent | b3558b50786dd8a66e4c4011647c048612bbfa7f (diff) | |
| download | forums-456de639123ae3da6320bed6140ab69ac9925e74.tar forums-456de639123ae3da6320bed6140ab69ac9925e74.tar.gz forums-456de639123ae3da6320bed6140ab69ac9925e74.tar.bz2 forums-456de639123ae3da6320bed6140ab69ac9925e74.tar.xz forums-456de639123ae3da6320bed6140ab69ac9925e74.zip | |
[feature/request-class] Refactor request classes to use autoloading
All class names have been adjusted to use a phpbb_request prefix,
allowing them to be autoloaded.
Also introduces some improvements to autoloading in general.
PHPBB3-9716
Diffstat (limited to 'phpBB/common.php')
| -rw-r--r-- | phpBB/common.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index 57a1384ee4..41df3049a1 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -195,11 +195,6 @@ require($phpbb_root_path . 'includes/template.' . $phpEx); require($phpbb_root_path . 'includes/session.' . $phpEx); require($phpbb_root_path . 'includes/auth.' . $phpEx); -require($phpbb_root_path . 'includes/request/type_cast_helper_interface.' . $phpEx); -require($phpbb_root_path . 'includes/request/type_cast_helper.' . $phpEx); -require($phpbb_root_path . 'includes/request/deactivated_super_global.' . $phpEx); -require($phpbb_root_path . 'includes/request/request_interface.' . $phpEx); -require($phpbb_root_path . 'includes/request/request.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_content.' . $phpEx); @@ -210,12 +205,18 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); +// Cache must be loaded before class loader +$cache = new cache(); + +// Setup class loader first +$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx, $cache); +$class_loader->register(); + // Instantiate some basic classes -$request = new phpbb_request(new phpbb_type_cast_helper()); +$request = new phpbb_request(); $user = new user(); $auth = new auth(); $template = new template(); -$cache = new cache(); $db = new $sql_db(); $class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx, $cache); |
