/** * * @return DiggmoreConfig */ public static function instance() { if (self::$_instance == null) { self::$_instance = new DiggmoreConfig(); } return self::$_instance; }
private function getFrontFile() { // $path = $_SERVER['REQUEST_URI']; if (strstr($path, '?')) { $path = substr($path, 0, strpos($path, '?')); } $path = explode('/', trim($path, '/')); $front_config = DiggmoreConfig::instance()->get('front'); if (isset($front_config['frontfile'][$path[0]])) { // $front = $front_config['frontfile'][$path[0]]; } else { $front = $front_config['default_front']; } return $front_file = DIGGMORE_ROOT . '/_' . $front . '.php'; }