From 9329b16ab13f3a4caf107df358c3c58bda2dcd8a Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 3 Nov 2010 18:35:31 +0100 Subject: [task/acm-refactor] Refactor the ACM classes to have a common interface. They are now refered to as cache drivers rather than ACM classes. The additional utility functions from the original cache class have been moved to the cache_service. The class loader is now instantiated without a cache instance and passed one as soon as it is constructed to allow autoloading the cache classes. PHPBB3-9983 --- phpBB/style.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'phpBB/style.php') diff --git a/phpBB/style.php b/phpBB/style.php index 3c2f94023b..418bbb9bab 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -57,18 +57,19 @@ if ($id) { // Include files require($phpbb_root_path . 'includes/class_loader.' . $phpEx); - require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx); - require($phpbb_root_path . 'includes/cache.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); - $cache = new cache(); - - $class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx, $cache); + $class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx); $class_loader->register(); - $request = new phpbb_request(); + // set up caching + $acm = phpbb_cache_factory::create($acm_type)->get_acm(); + $class_loader->set_acm($acm); + $cache = new phpbb_cache_service($acm); + + $request = new phpbb_request(); $db = new $sql_db(); // make sure request_var uses this request instance @@ -308,5 +309,3 @@ if ($id) } $db->sql_close(); } - -exit; -- cgit v1.2.1 From 1aef7eb20ee195c7f21d6c5b78653b7c43e669ec Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 9 Jan 2011 21:09:56 +0100 Subject: [task/acm-refactor] Cleaning up left over mentions of ACM and fixing tests. PHPBB3-9983 --- phpBB/style.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/style.php') diff --git a/phpBB/style.php b/phpBB/style.php index 418bbb9bab..cff91a2312 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -65,9 +65,9 @@ if ($id) $class_loader->register(); // set up caching - $acm = phpbb_cache_factory::create($acm_type)->get_acm(); - $class_loader->set_acm($acm); - $cache = new phpbb_cache_service($acm); + $cache_factory = new phpbb_cache_factory($acm_type); + $class_loader->set_cache($cache_factory->get_driver()); + $cache = $cache_factory->get_service(); $request = new phpbb_request(); $db = new $sql_db(); -- cgit v1.2.1