Minahito
minah****@users*****
2006年 1月 5日 (木) 17:27:04 JST
Index: xoops2jp/html/kernel/XCube_Root.class.php diff -u xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.7 xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.8 --- xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.7 Mon Dec 26 21:18:42 2005 +++ xoops2jp/html/kernel/XCube_Root.class.php Thu Jan 5 17:27:04 2006 @@ -1,6 +1,6 @@ <?php /** - * @version $Id: XCube_Root.class.php,v 1.1.2.7 2005/12/26 12:18:42 minahito Exp $ + * @version $Id: XCube_Root.class.php,v 1.1.2.8 2006/01/05 08:27:04 minahito Exp $ * @package Cube */ @@ -64,6 +64,8 @@ */ var $mThemeName = null; + var $mCacheSystem = null; + function XCube_Root() { } @@ -235,6 +237,30 @@ { return $this->mThemeName; } + + function &getCacheSystem() + { + if (!is_object($this->mCacheSystem)) { + $this->mCacheSystem =& $this->_createInstance($this->mSiteConfig['Cube']['CacheSystem.class'], $this->mSiteConfig['Cube']['CacheSystem.path']); + } + + return $this->mCacheSystem; + } + + function &_createInstance($className, $classPath=null) + { + $ret = null; + + if($classPath!=null) { + require_once XOOPS_ROOT_PATH . "/" . $classPath . "/" . $className . ".class.php"; + } + + if(class_exists($className)) { + $ret =& new $className(); + } + + return $ret; + } } ?> \ No newline at end of file