From 9da20410515ca1c98b8c020e37692fb43345f50b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 3 Sep 2011 23:48:15 -0500 Subject: [PATCH] added resolver class file. --- laravel/application.php | 25 ------------------------- laravel/bootstrap.php | 1 + laravel/resolver.php | 26 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 laravel/resolver.php diff --git a/laravel/application.php b/laravel/application.php index cf7f07b5..9808cf0e 100644 --- a/laravel/application.php +++ b/laravel/application.php @@ -1,30 +1,5 @@ registered('laravel.'.$key)) - { - return IoC::container()->resolve('laravel.'.$key); - } - elseif (IoC::container()->registered($key)) - { - return IoC::container()->resolve($key); - } - - throw new \Exception("Attempting to access undefined property [$key]."); - } - -} - class Application extends Resolver { /** diff --git a/laravel/bootstrap.php b/laravel/bootstrap.php index bd233dfa..d960dd40 100644 --- a/laravel/bootstrap.php +++ b/laravel/bootstrap.php @@ -35,6 +35,7 @@ define('VIEW_PATH', APP_PATH.'views/'); // -------------------------------------------------------------- // Bootstrap the application instance. // -------------------------------------------------------------- +require SYS_PATH.'resolver'.EXT; require SYS_PATH.'application'.EXT; $application = new Application; diff --git a/laravel/resolver.php b/laravel/resolver.php new file mode 100644 index 00000000..4a1398a2 --- /dev/null +++ b/laravel/resolver.php @@ -0,0 +1,26 @@ +registered('laravel.'.$key)) + { + return IoC::container()->resolve('laravel.'.$key); + } + elseif (IoC::container()->registered($key)) + { + return IoC::container()->resolve($key); + } + + throw new \Exception("Attempting to access undefined property [$key]."); + } + +} \ No newline at end of file