continued ioc refactoring.

This commit is contained in:
Taylor Otwell
2011-08-26 21:42:04 -05:00
parent fb3a0df0dd
commit 1e49001dfc
44 changed files with 1388 additions and 1046 deletions

View File

@@ -2,6 +2,25 @@
return array(
/*
|--------------------------------------------------------------------------
| Database Manager Auto Load
|--------------------------------------------------------------------------
|
| Determines if the database manager will be loaded one every request.
|
| By default, the database manager is loaded on every request and set on
| a property of the application instance. However, if you will not be using
| any of the Laravel database facilities, you may set this to "false".
|
| Loading the database manager does not create database connections. The
| connections are only established once you request a connection from the
| database manager instance.
|
*/
'autoload' => true,
/*
|--------------------------------------------------------------------------
| Default Database Connection

View File

@@ -4,36 +4,7 @@ return array(
/*
|--------------------------------------------------------------------------
| Error Detail
|--------------------------------------------------------------------------
|
| Detailed error messages contain information about the file in which
| an error occurs, a stack trace, and a snapshot of the source code
| in which the error occured.
|
| If your application is in production, consider turning off error details
| for enhanced security and user experience.
|
*/
'detail' => true,
/*
|--------------------------------------------------------------------------
| Error Logging
|--------------------------------------------------------------------------
|
| Error Logging will use the "logger" function defined below to log error
| messages, which gives you complete freedom to determine how error
| messages are logged. Enjoy the flexibility.
|
*/
'log' => false,
/*
|--------------------------------------------------------------------------
| Error Logger
| Error Handler
|--------------------------------------------------------------------------
|
| Because of the various ways of managing error logging, you get complete
@@ -50,11 +21,11 @@ return array(
|
*/
'logger' => function($severity, $message, $trace)
'handler' => function($exception)
{
$file = IoC::resolve('laravel.file');
var_dump($exception);
$file->append(STORAGE_PATH.'log.txt', date('Y-m-d H:i:s').' '.$severity.' - '.$message.PHP_EOL);
exit(1);
},
);

View File

@@ -1,5 +1,8 @@
<?php
use Laravel\Application;
use Laravel\Response;
return array(
/*
@@ -42,13 +45,13 @@ return array(
|
*/
'before' => function(Laravel\Request $request)
'before' => function(Application $application)
{
// Do stuff before every request to your application.
},
'after' => function(Laravel\Request $request, Laravel\Response $response)
'after' => function(Application $application, Response $response)
{
// Do stuff after every request to your application.
},

View File

@@ -37,9 +37,9 @@ return array(
|
*/
'GET /' => function($request)
'GET /' => function($application)
{
return View::make('home.index');
return $application->view->make('home.index');
},
);