From 2b659dfae941a83be2d09c9e00f505e44c9492f6 Mon Sep 17 00:00:00 2001 From: Michael Hasselbring Date: Thu, 16 Jun 2011 20:38:22 -0500 Subject: [PATCH] ability to load a config file with out a key --- system/config.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/system/config.php b/system/config.php index 5c2d506e..62dd0fc8 100644 --- a/system/config.php +++ b/system/config.php @@ -17,8 +17,19 @@ class Config { */ public static function get($key) { - list($file, $key) = static::parse($key); + // ----------------------------------------------------- + // We are are just pulling in a file, skip loading a key + // ----------------------------------------------------- + if(strpos($key, '.') == 0) + { + static::load($key); + + return static::$items[$key]; + } + + list($file, $key) = static::parse($key); + static::load($file); if (array_key_exists($key, static::$items[$file]))