fixing bugs and refactoring.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user