1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[feature/dic] Adjust cache driver class name for BC

PHPBB3-10739
This commit is contained in:
Igor Wiedler 2012-07-26 16:37:59 +02:00
parent 5cdcaaa531
commit 5a548fa344

View File

@ -38,7 +38,7 @@ class phpbb_di_processor_config implements phpbb_di_processor_interface
$container->setParameter('core.php_ext', $this->php_ext);
$container->setParameter('core.table_prefix', $table_prefix);
$container->setParameter('cache.driver.class', $acm_type);
$container->setParameter('cache.driver.class', $this->fix_acm_type($acm_type));
$container->setParameter('dbal.driver.class', 'dbal_'.$dbms);
$container->setParameter('dbal.dbhost', $dbhost);
$container->setParameter('dbal.dbuser', $dbuser);
@ -49,4 +49,13 @@ class phpbb_di_processor_config implements phpbb_di_processor_interface
$container->set('container', $container);
}
protected function fix_acm_type($acm_type)
{
if (preg_match('#^[a-z]+$#', $acm_type)) {
return 'phpbb_cache_driver_'.$acm_type;
}
return $acm_type;
}
}