aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-11-14 11:33:24 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-11-14 11:33:24 -0600
commitd2187424da6ff2e0d4a69a6e21bac7e92f68335a (patch)
treeee099178886dd3a6e737f2dee08bd6312bf25ce1 /phpBB/common.php
parent7948aaa78ed7e543a0773ee1a858ef45f5e5a5bf (diff)
parent9c28470ad7b45c10ce3a32065650e4b17f9f27ea (diff)
downloadforums-d2187424da6ff2e0d4a69a6e21bac7e92f68335a.tar
forums-d2187424da6ff2e0d4a69a6e21bac7e92f68335a.tar.gz
forums-d2187424da6ff2e0d4a69a6e21bac7e92f68335a.tar.bz2
forums-d2187424da6ff2e0d4a69a6e21bac7e92f68335a.tar.xz
forums-d2187424da6ff2e0d4a69a6e21bac7e92f68335a.zip
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/11103
Conflicts: phpBB/common.php phpBB/config/services.yml
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php39
1 files changed, 21 insertions, 18 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index 37a42c7b8f..4b50280cb0 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -69,11 +69,10 @@ if (!defined('PHPBB_INSTALLED'))
// Include files
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
-require($phpbb_root_path . 'includes/di/processor/interface.' . $phpEx);
-require($phpbb_root_path . 'includes/di/processor/config.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/db/' . ltrim($dbms, 'dbal_') . '.' . $phpEx);
@@ -82,16 +81,27 @@ 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');
-$phpbb_container = new ContainerBuilder();
-$loader = new YamlFileLoader($phpbb_container, new FileLocator(__DIR__.'/config'));
-$loader->load('services.yml');
-
-$processor = new phpbb_di_processor_config($phpbb_root_path . 'config.' . $phpEx, $phpbb_root_path, $phpEx);
-$processor->process($phpbb_container);
-
// Setup class loader first
-$phpbb_class_loader = $phpbb_container->get('class_loader');
-$phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext');
+$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", ".$phpEx");
+$phpbb_class_loader->register();
+$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", ".$phpEx");
+$phpbb_class_loader_ext->register();
+
+// Set up container
+$phpbb_container = phpbb_create_dumped_container_unless_debug(
+ array(
+ new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
+ new phpbb_di_extension_core($phpbb_root_path),
+ ),
+ array(
+ new phpbb_di_pass_collection_pass(),
+ ),
+ $phpbb_root_path,
+ $phpEx
+);
+
+$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
+$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
// set up caching
$cache = $phpbb_container->get('cache');
@@ -120,13 +130,6 @@ $phpbb_style = $phpbb_container->get('style');
$phpbb_notifications = $phpbb_container->get('notification_manager');
-$ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor'));
-foreach ($ids as $id)
-{
- $processor = $phpbb_container->get($id);
- $processor->process($phpbb_container);
-}
-
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('phpbb_template', 'display')));