refactoring.
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
|
||||
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.
|
||||
*
|
||||
@@ -11,13 +18,6 @@ class Config {
|
||||
*/
|
||||
protected static $items = array();
|
||||
|
||||
/**
|
||||
* The paths to the configuration files.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $paths = array();
|
||||
|
||||
/**
|
||||
* Determine if a configuration item or file exists.
|
||||
*
|
||||
@@ -122,8 +122,8 @@ class Config {
|
||||
$config = array();
|
||||
|
||||
// Configuration files cascade. Typically, the system configuration array is loaded
|
||||
// first, followed by the application array, followed by the environment array.
|
||||
// This allows the convenient overriding of configuration options.
|
||||
// first, followed by the application array, providing the convenient cascading
|
||||
// of configuration options from system to application.
|
||||
foreach (static::$paths as $directory)
|
||||
{
|
||||
if (file_exists($path = $directory.$file.EXT))
|
||||
|
||||
Reference in New Issue
Block a user