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); }
public static function getInstance($type = 'output', $options = array()) { return MCacheController::getInstance($type, $options); }