Esempio n. 1
0
 private static function file($level)
 {
     if ($level > 0x3) {
         return DIR_LOG . Arch_Env::get(Arch_Env::NS) . '.log.wf';
     } else {
         return DIR_LOG . Arch_Env::get(Arch_Env::NS) . '.log';
     }
 }
Esempio n. 2
0
 /**
  * 判断配置文件是否存在
  *
  * @param string $file
  * @param boolean $isGlobal
  *
  * @return bool
  */
 public static function isExist($file, $name = null, $isGlobal = false)
 {
     $ns = Arch_Env::get(Arch_Env::NS);
     if (false === $isGlobal && $ns) {
         $file = $ns . '/' . $file;
     }
     $fv = null;
     if (isset(self::$cache[$file]) == false) {
         $f = self::$opt['path'] . $file . '.yaml';
         if (false == is_file($f)) {
             return false;
         }
         self::$cache[$file] = yaml_parse_file($f);
     }
     $fv = self::$cache[$file];
     if ($name === null) {
         return true;
     }
     return isset($fv[$name]);
 }