refactoring.

This commit is contained in:
Taylor Otwell
2011-09-27 21:10:32 -05:00
parent ed3e3e73cc
commit c6f9734603
15 changed files with 253 additions and 178 deletions

View File

@@ -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))