Commit 21592ec6 authored by Taylor Otwell's avatar Taylor Otwell

refactoring and tweaking.

parent 14186a00
...@@ -35,6 +35,15 @@ require SYS_PATH.'config'.EXT; ...@@ -35,6 +35,15 @@ require SYS_PATH.'config'.EXT;
require SYS_PATH.'loader'.EXT; require SYS_PATH.'loader'.EXT;
require SYS_PATH.'arr'.EXT; require SYS_PATH.'arr'.EXT;
/**
* If a Laravel environment has been specified on the server, we will
* add a path to the configuration manager for the environment.
*/
if (isset($_SERVER['LARAVEL_ENV']))
{
Config::glance(CONFIG_PATH.$_SERVER['LARAVEL_ENV'].'/');
}
/** /**
* Bootstrap the application inversion of control (IoC) container. * Bootstrap the application inversion of control (IoC) container.
* The container provides the convenient resolution of objects and * The container provides the convenient resolution of objects and
......
...@@ -140,4 +140,15 @@ class Config { ...@@ -140,4 +140,15 @@ class Config {
return isset(static::$items[$file]); return isset(static::$items[$file]);
} }
/**
* Add a directory to the configuration manager's search paths.
*
* @param string $path
* @return void
*/
public static function glance($path)
{
static::$paths[] = $path;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment