Пример #1
0
 /**
  *
  * @return DiggmoreConfig
  */
 public static function instance()
 {
     if (self::$_instance == null) {
         self::$_instance = new DiggmoreConfig();
     }
     return self::$_instance;
 }
Пример #2
0
 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';
 }