Commit dbf43877 authored by Taylor Otwell's avatar Taylor Otwell

added packages auto-load array.

parent fb984016
<?php
return array(
/*
|--------------------------------------------------------------------------
| Auto-Loaded Packages
|--------------------------------------------------------------------------
|
| The packages that should be auto-loaded each time Laravel handles
| a request. These should generally be packages that you use on almost
| every request to your application.
|
| Each package specified here will be bootstrapped and can be conveniently
| used by your application's routes, models, and libraries.
|
| Note: The package names in this array should correspond to a package
| directory in application/packages.
|
*/
'autoload' => array(),
);
\ No newline at end of file
...@@ -140,6 +140,13 @@ require SYS_PATH.'routing/router'.EXT; ...@@ -140,6 +140,13 @@ require SYS_PATH.'routing/router'.EXT;
require SYS_PATH.'routing/loader'.EXT; require SYS_PATH.'routing/loader'.EXT;
require SYS_PATH.'routing/filter'.EXT; require SYS_PATH.'routing/filter'.EXT;
// --------------------------------------------------------------
// Load the packages that are in the auto-loaded packages array.
// --------------------------------------------------------------
require SYS_PATH.'package'.EXT;
System\Package::load(System\Config::get('packages.autoload'));
// -------------------------------------------------------------- // --------------------------------------------------------------
// Register the route filters. // Register the route filters.
// -------------------------------------------------------------- // --------------------------------------------------------------
......
...@@ -23,6 +23,8 @@ class Package { ...@@ -23,6 +23,8 @@ class Package {
{ {
static::load($value); static::load($value);
} }
return;
} }
// Packages may have a bootstrap file, which commonly is used to register auto-loaders // Packages may have a bootstrap file, which commonly is used to register auto-loaders
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment