1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

[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
This commit is contained in:
Igor Wiedler
2010-11-03 18:35:31 +01:00
parent 36e95f939d
commit 9329b16ab1
23 changed files with 415 additions and 102 deletions

View File

@@ -61,8 +61,6 @@ if (!empty($load_extensions) && function_exists('dl'))
// 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/template.' . $phpEx);
require($phpbb_root_path . 'includes/session.' . $phpEx);
require($phpbb_root_path . 'includes/auth.' . $phpEx);
@@ -93,11 +91,14 @@ else
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
}
$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();
// 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();
$user = new user();
$db = new $sql_db();