tweaking has methods.

This commit is contained in:
Taylor Otwell
2011-06-16 22:45:33 -05:00
parent 73d8e2f2fa
commit 5c275db6f4
4 changed files with 23 additions and 38 deletions

View File

@@ -24,10 +24,12 @@ class Config {
if(strpos($key, '.') === false)
{
static::load($key);
return static::$items[$key];
}
list($file, $key) = static::parse($key);
static::load($file);
if (array_key_exists($key, static::$items[$file]))
@@ -48,6 +50,7 @@ class Config {
public static function set($key, $value)
{
list($file, $key) = static::parse($key);
static::load($file);
static::$items[$file][$key] = $value;