diff options
Diffstat (limited to 'phpBB/includes/cache/factory.php')
-rw-r--r-- | phpBB/includes/cache/factory.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/includes/cache/factory.php b/phpBB/includes/cache/factory.php new file mode 100644 index 0000000000..01c4d0b901 --- /dev/null +++ b/phpBB/includes/cache/factory.php @@ -0,0 +1,42 @@ +<?php +/** +* +* @package acm +* @copyright (c) 2010 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** +* @package acm +*/ +class phpbb_cache_factory +{ + private $acm_type; + + public function __construct($acm_type) + { + $this->acm_type = $acm_type; + } + + public function get_driver() + { + $class_name = 'phpbb_cache_driver_' . $this->acm_type; + return new $class_name(); + } + + public function get_service() + { + $driver = $this->get_driver(); + $service = new phpbb_cache_service($driver); + return $service; + } +} |