Commit 3e398d1b authored by Taylor Otwell's avatar Taylor Otwell

added auto start bundle option.

parent 3292024e
...@@ -112,12 +112,18 @@ return array( ...@@ -112,12 +112,18 @@ return array(
| as the name of a bundle and the URIs it responds to. This value is | as the name of a bundle and the URIs it responds to. This value is
| the number of that bundle info is cached. | the number of that bundle info is cached.
| |
| Auto:
|
| You may wish to auto-start some bundles instead of lazy-loading them.
| This is useful for debug bundles as well as bundles that are used
| throughout your application. You may specify which bundles should
| be auto-loaded in this array.
|
*/ */
'bundle' => array( 'bundle' => array(
'cache' => 0, 'cache' => 0,
'auto' => array(),
), ),
/* /*
......
...@@ -136,9 +136,9 @@ Bundle::start(DEFAULT_BUNDLE); ...@@ -136,9 +136,9 @@ Bundle::start(DEFAULT_BUNDLE);
* array of auto-loaded bundles. This lets the developer have an * array of auto-loaded bundles. This lets the developer have an
* easy way to load bundles for every request. * easy way to load bundles for every request.
*/ */
foreach (Bundle::all() as $bundle => $config) foreach (Config::get('application.bundle.auto') as $bundle)
{ {
if ($config['auto']) Bundle::start($bundle); Bundle::start($bundle);
} }
/** /**
......
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