fixing bugs and refactoring.

This commit is contained in:
Taylor Otwell
2011-10-15 22:38:43 -05:00
parent b40e69c47a
commit a7e98e8e9a
7 changed files with 57 additions and 34 deletions

View File

@@ -2,13 +2,6 @@
class Config {
/**
* The paths to the configuration files.
*
* @var array
*/
public static $paths = array(SYS_CONFIG_PATH, CONFIG_PATH);
/**
* All of the loaded configuration items.
*
@@ -18,6 +11,13 @@ class Config {
*/
public static $items = array();
/**
* The paths to the configuration files.
*
* @var array
*/
public static $paths = array(SYS_CONFIG_PATH, CONFIG_PATH);
/**
* Determine if a configuration item or file exists.
*
@@ -114,9 +114,14 @@ class Config {
{
$segments = explode('.', $key);
$key = (count($segments) > 1) ? implode('.', array_slice($segments, 1)) : null;
return array($segments[0], $key);
if (count($segments) >= 2)
{
return array($segments[0], implode('.', array_slice($segments, 1)));
}
else
{
return array($segments[0], null);
}
}
/**