示例#1
0
 public static function conf()
 {
     $env = Env::env();
     if (!self::$conf[$env]) {
         throw new \RuntimeException("Environment ({$env}): database not configured");
     }
     return self::$conf[$env];
 }
示例#2
0
文件: Redis.php 项目: raframework/ra
 public static function conf($database)
 {
     $env = Env::env();
     if (!self::$conf[$env]) {
         throw new \RuntimeException("Environment ({$env}): redis not configured");
     }
     if (!self::$conf[$env][$database]) {
         throw new \RuntimeException("Redis database({$database}) not configured");
     }
     return self::$conf[$env][$database];
 }