continuing to refactor the bootstrap process.

This commit is contained in:
Taylor Otwell
2011-10-18 21:03:13 -05:00
parent 9fc9f88a41
commit d5d9776298
5 changed files with 117 additions and 61 deletions

View File

@@ -16,7 +16,7 @@ class Config {
*
* @var array
*/
public static $paths = array(SYS_CONFIG_PATH, CONFIG_PATH);
public static $paths = array(SYS_CONFIG_PATH, CONFIG_PATH, ENV_CONFIG_PATH);
/**
* Determine if a configuration item or file exists.
@@ -130,7 +130,7 @@ class Config {
* @param string $file
* @return bool
*/
protected static function load($file)
public static function load($file)
{
if (isset(static::$items[$file])) return true;
@@ -141,7 +141,7 @@ class Config {
// cascading of configuration options from system to application.
foreach (static::$paths as $directory)
{
if (file_exists($path = $directory.$file.EXT))
if ($directory !== '' and file_exists($path = $directory.$file.EXT))
{
$config = array_merge($config, require $path);
}