Skip to content

Commit 7803708

Browse files
committed
Merge pull request #11 from mikelbring/develop
Load a config file with out a key
2 parents 825ac35 + 2b659df commit 7803708

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

system/config.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,19 @@ class Config {
1717
*/
1818
public static function get($key)
1919
{
20-
list($file, $key) = static::parse($key);
2120

21+
// -----------------------------------------------------
22+
// We are are just pulling in a file, skip loading a key
23+
// -----------------------------------------------------
24+
if(strpos($key, '.') == 0)
25+
{
26+
static::load($key);
27+
28+
return static::$items[$key];
29+
}
30+
31+
list($file, $key) = static::parse($key);
32+
2233
static::load($file);
2334

2435
if (array_key_exists($key, static::$items[$file]))

0 commit comments

Comments
 (0)