101 lines
3.3 KiB
PHP
101 lines
3.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| PHP Display Errors Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Since Laravel intercepts and displays all errors with a detailed stack
|
|
| trace, we can turn off the display_errors ini directive. However, you
|
|
| may want to enable this option if you ever run into a dreaded white
|
|
| screen of death, as it can provide some clues.
|
|
|
|
|
*/
|
|
|
|
ini_set('display_errors', 'Off');
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Register Class Aliases
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Aliases allow you to use classes without always specifying their fully
|
|
| namespaced path. This is convenient for working with any library that
|
|
| makes a heavy use of namespace for class organization. Here we will
|
|
| simply register the configured class aliases.
|
|
|
|
|
*/
|
|
|
|
$aliases = Laravel\Config::get('application.aliases');
|
|
|
|
Laravel\Autoloader::$aliases = $aliases;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Set The Default Timezone
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| We need to set the default timezone for the application. This controls
|
|
| the timezone that will be used by any of the date methods and classes
|
|
| utilized by Laravel or your application. The timezone may be set in
|
|
| your application configuration file.
|
|
|
|
|
*/
|
|
|
|
date_default_timezone_set(Config::get('application.timezone'));
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Start / Load The User Session
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Sessions allow the web, which is stateless, to simulate state. In other
|
|
| words, sessions allow you to store information about the current user
|
|
| and state of your application. Here we'll just fire up the session
|
|
| if a session driver has been configured.
|
|
|
|
|
*/
|
|
|
|
if (Config::get('session.driver') !== '')
|
|
{
|
|
Session::load();
|
|
}
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Auto-Loader Mappings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Laravel uses a simple array of class to path mappings to drive the class
|
|
| auto-loader. This simple approach helps avoid the performance problems
|
|
| of searching through directories by convention.
|
|
|
|
|
| Registering a mapping couldn't be easier. Just pass an array of class
|
|
| to path maps into the "map" function of Autoloader. Then, when you
|
|
| want to use that class, just use it. It's simple!
|
|
|
|
|
*/
|
|
|
|
Autoloader::map(array(
|
|
'Base_Controller' => path('app').'controllers/base.php',
|
|
));
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Auto-Loader Directories
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The Laravel auto-loader can search directories for files using the PSR-0
|
|
| naming convention. This convention basically organizes classes by using
|
|
| the class namespace to indicate the directory structure.
|
|
|
|
|
| So you don't have to manually map all of your models, we've added the
|
|
| models and libraries directories for you. So, you can model away and
|
|
| the auto-loader will take care of the rest.
|
|
|
|
|
*/
|
|
|
|
Autoloader::directories(array(
|
|
path('app').'models',
|
|
path('app').'libraries',
|
|
)); |