refactoring and bug fixes.

This commit is contained in:
Taylor Otwell
2011-09-29 21:22:48 -05:00
parent 2eeb636198
commit 14186a00e0
22 changed files with 192 additions and 132 deletions

View File

@@ -26,8 +26,9 @@ define('EXT', '.php');
define('BLADE_EXT', '.blade.php');
/**
* Load the classes that can't be resolved through the auto-loader. These are typically classes
* that are used by the auto-loader or configuration classes, and therefore cannot be auto-loaded.
* Load the classes that can't be resolved through the auto-loader.
* These are typically classes that are used by the auto-loader or
* configuration classes, and therefore cannot be auto-loaded.
*/
require SYS_PATH.'facades'.EXT;
require SYS_PATH.'config'.EXT;
@@ -35,9 +36,10 @@ require SYS_PATH.'loader'.EXT;
require SYS_PATH.'arr'.EXT;
/**
* Bootstrap the application inversion of control (IoC) container. The container provides the
* convenient resolution of objects and their dependencies, allowing for flexibility and
* testability within the framework and application.
* Bootstrap the application inversion of control (IoC) container.
* The container provides the convenient resolution of objects and
* their dependencies, allowing for flexibility and testability
* within the framework and application.
*/
require SYS_PATH.'container'.EXT;
@@ -46,25 +48,13 @@ $container = new Container(Config::get('container'));
IoC::$container = $container;
/**
* Register the application auto-loader. The auto-loader is responsible for the lazy-loading
* of all of the Laravel core classes, as well as the developer created libraries and models.
* Register the application auto-loader. The auto-loader is responsible
* for the lazy-loading of all of the Laravel core classes, as well as
* the developer created libraries and models.
*/
spl_autoload_register(array($container->resolve('laravel.loader'), 'load'));
/**
* Define a few convenient global functions.
*/
function e($value)
{
return HTML::entities($value);
}
function __($key, $replacements = array(), $language = null)
{
return Lang::line($key, $replacements, $language);
}
function fe($function)
{
return function_exists($function);
}
require 'functions'.EXT;