diff --git a/application/routes.php b/application/routes.php index 05f95ef5..6d460842 100644 --- a/application/routes.php +++ b/application/routes.php @@ -37,9 +37,9 @@ return array( | */ - 'GET /' => function($application) + 'GET /' => function($laravel) { - return $application->view->make('home.index'); + return $laravel->view->make('home.index'); }, ); \ No newline at end of file diff --git a/application/views/error/404.php b/application/views/error/404.php index 3d497472..0b5a5a59 100644 --- a/application/views/error/404.php +++ b/application/views/error/404.php @@ -81,7 +81,7 @@

-

We couldn't find the resource you requested. Would you like go to our home page instead?

+

We couldn't find the resource you requested. Would you like go to our home page instead?

\ No newline at end of file diff --git a/laravel/download.php b/laravel/download.php index 0f0a6de9..3edf1f22 100644 --- a/laravel/download.php +++ b/laravel/download.php @@ -2,6 +2,13 @@ class Download extends Response { + /** + * The file manager instance. + * + * @var File + */ + protected $file; + /** * Create a new download generator instance. * diff --git a/laravel/response.php b/laravel/response.php index 7f43b2f5..414d43ce 100644 --- a/laravel/response.php +++ b/laravel/response.php @@ -57,6 +57,8 @@ class Response_Factory { */ public function error($code, $data = array()) { + $data['homepage'] = IoC::resolve('laravel.config')->get('application.url'); + return new Response($this->view->make('error/'.$code, $data), $code); } @@ -221,4 +223,14 @@ class Response { return $this; } + /** + * Magic Method for passing undefined static methods to the Response_Factory instance + * registered in the application IoC container. This provides easy access to the + * response functions while still maintaining testability within the classes. + */ + public static function __callStatic($method, $parameters) + { + return call_user_func_array(array(IoC::container()->resolve('laravel.response'), $method), $parameters); + } + } \ No newline at end of file diff --git a/laravel/view.php b/laravel/view.php index 07fba57d..a7a73ecb 100644 --- a/laravel/view.php +++ b/laravel/view.php @@ -8,6 +8,13 @@ */ class View_Composer { + /** + * The view composers. + * + * @var array + */ + protected $composers; + /** * Create a new view composer instance. * @@ -59,6 +66,20 @@ class View_Composer { */ class View_Factory { + /** + * The directory containing the views. + * + * @var string + */ + protected $path; + + /** + * The view composer instance. + * + * @var View_Composer + */ + protected $composer; + /** * Create a new view factory instance. * @@ -114,14 +135,6 @@ class View_Factory { /** * Magic Method for handling the dynamic creation of named views. - * - * - * // Create an instance of the "login" named view - * $view = View::of_login(); - * - * // Create an instance of the "login" named view and bind data to the view - * $view = View::of_login(array('name' => 'Fred')); - * */ public function __call($method, $parameters) {