ability to load a config file with out a key

This commit is contained in:
Michael Hasselbring 2011-06-16 20:38:22 -05:00
parent df235f3fb7
commit 2b659dfae9
1 changed files with 12 additions and 1 deletions

View File

@ -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]))