예제 #1
0
 public static function getInstance($type = 'output', $options = array())
 {
     MCacheController::addIncludePath(MPATH_WP_CNT . '/miwi/framework/cache/controller');
     $type = strtolower(preg_replace('/[^A-Z0-9_\\.-]/i', '', $type));
     $class = 'MCacheController' . ucfirst($type);
     if (!class_exists($class)) {
         mimport('framework.filesystem.path');
         if ($path = MPath::find(MCacheController::addIncludePath(), strtolower($type) . '.php')) {
             include_once $path;
         } else {
             MError::raiseError(500, 'Unable to load Cache Controller: ' . $type);
         }
     }
     return new $class($options);
 }
예제 #2
0
파일: cache.php 프로젝트: vanie3/appland
 public static function getInstance($type = 'output', $options = array())
 {
     return MCacheController::getInstance($type, $options);
 }