refactoring and tweaking.

This commit is contained in:
Taylor Otwell 2011-09-30 20:28:45 -05:00
parent 14186a00e0
commit 21592ec67f
2 changed files with 20 additions and 0 deletions

View File

@ -35,6 +35,15 @@
require SYS_PATH.'loader'.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.
* The container provides the convenient resolution of objects and

View File

@ -140,4 +140,15 @@ protected static function load($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;
}
}