aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-06-26 16:39:01 +0200
committerTristan Darricau <github@nicofuma.fr>2014-07-07 01:02:04 +0200
commitcdf87e0078e3c4d78bfd1b9d12100eb1451b5633 (patch)
treeb4ec0c65e60e41c4823a07ae2c2b8cd41e205a81 /phpBB/common.php
parentf8eca98b3f21a45181d04fa1eb00a0e4645e90de (diff)
downloadforums-cdf87e0078e3c4d78bfd1b9d12100eb1451b5633.tar
forums-cdf87e0078e3c4d78bfd1b9d12100eb1451b5633.tar.gz
forums-cdf87e0078e3c4d78bfd1b9d12100eb1451b5633.tar.bz2
forums-cdf87e0078e3c4d78bfd1b9d12100eb1451b5633.tar.xz
forums-cdf87e0078e3c4d78bfd1b9d12100eb1451b5633.zip
[ticket/12775] Add a conter_factory class and remove functions_container
PHPBB3-12775
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index e96a34938a..a30b7b989f 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -21,11 +21,11 @@ if (!defined('IN_PHPBB'))
}
require($phpbb_root_path . 'includes/startup.' . $phpEx);
+require($phpbb_root_path . 'phpbb/di/container_factory.' . $phpEx);
-if (file_exists($phpbb_root_path . 'config.' . $phpEx))
-{
- require($phpbb_root_path . 'config.' . $phpEx);
-}
+$factory = new \phpbb\di\container_factory($phpbb_root_path, $phpEx);
+$config_file_data = $factory->load_config_file();
+extract($config_file_data);
if (!defined('PHPBB_INSTALLED'))
{
@@ -80,7 +80,6 @@ require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
-require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
include($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
@@ -98,7 +97,8 @@ $phpbb_class_loader_ext->register();
phpbb_load_extensions_autoloaders($phpbb_root_path);
// Set up container
-$phpbb_container = phpbb_create_default_container($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'));