1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 22:40:39 +02:00

[task/acm-refactor] Cleaning up left over mentions of ACM and fixing tests.

PHPBB3-9983
This commit is contained in:
Nils Adermann
2011-01-09 21:09:56 +01:00
committed by Igor Wiedler
parent 9329b16ab1
commit 1aef7eb20e
13 changed files with 76 additions and 117 deletions

View File

@@ -22,31 +22,22 @@ if (!defined('IN_PHPBB'))
class phpbb_cache_factory
{
private $acm_type;
public function __construct($acm_type)
{
$this->acm_type = $acm_type;
}
public function get_acm()
public function get_driver()
{
$class_name = 'phpbb_cache_driver_' . $this->acm_type;
return new $class_name();
}
public function get_service()
{
$acm = $this->get_acm();
$service = new phpbb_cache_service($acm);
$driver = $this->get_driver();
$service = new phpbb_cache_service($driver);
return $service;
}
/**
* for convenience to allow:
* $cache = phpbb_cache_factory::create('file')->get_service();
*/
public static function create($acm_type)
{
return new self($acm_type);
}
}