From a0370c628e38130277ccafd05bd106c065c3e38e Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Fri, 24 Jul 2009 23:23:24 -0500 Subject: [PATCH] Attach a file reader to Kohana::$config in bootstrap --- application/bootstrap.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/application/bootstrap.php b/application/bootstrap.php index 139a86b..4c17d8c 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -27,7 +27,7 @@ date_default_timezone_set('America/Chicago'); */ spl_autoload_register(array('Kohana', 'auto_load')); -//-- Kohana configuration ----------------------------------------------------- +//-- Configuration and initialization ----------------------------------------- /** * Initialize Kohana, setting the default options. @@ -59,11 +59,15 @@ Kohana::modules(array( )); /** - * Attach the file write to logging. Any Kohana_Log object can be attached, - * and multiple writers are supported. + * Attach the file write to logging. Multiple writers are supported. */ Kohana::$log->attach(new Kohana_Log_File(APPPATH.'logs')); +/** + * Attach a file reader to config. Multiple readers are supported. + */ +Kohana::$config->attach(new Kohana_Config_File); + /** * Set the routes. Each route must have a minimum of a name, a URI and a set of * defaults for the URI. @@ -78,7 +82,7 @@ Route::set('default', '((/(/)))') * Execute the main request using PATH_INFO. If no URI source is specified, * the URI will be automatically detected. */ -echo Request::instance($_SERVER['PATH_INFO']) +echo Request::instance() ->execute() ->send_headers() ->response;