diff options
Diffstat (limited to 'phpBB/common.php')
| -rw-r--r-- | phpBB/common.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index a30b7b989f..901c0bd713 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -21,10 +21,14 @@ if (!defined('IN_PHPBB')) } require($phpbb_root_path . 'includes/startup.' . $phpEx); -require($phpbb_root_path . 'phpbb/di/container_factory.' . $phpEx); +require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); + +// Setup class loader first +$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); +$phpbb_class_loader->register(); -$factory = new \phpbb\di\container_factory($phpbb_root_path, $phpEx); -$config_file_data = $factory->load_config_file(); +$config_php_handler = new \phpbb\config_php($phpbb_root_path, $phpEx); +$config_file_data = $config_php_handler->load_config_file(); extract($config_file_data); if (!defined('PHPBB_INSTALLED')) @@ -76,8 +80,6 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include files -require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); - require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_content.' . $phpEx); include($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx); @@ -88,18 +90,15 @@ 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'); -// Setup class loader first -$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); -$phpbb_class_loader->register(); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); phpbb_load_extensions_autoloaders($phpbb_root_path); // Set up container +$factory = new \phpbb\di\container_factory($config_php_handler, $phpbb_root_path, $phpEx); $phpbb_container = $factory->get_container(); - $phpbb_class_loader->set_cache($phpbb_container->get('cache.driver')); $phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver')); |
