From e996093b723c1d2f947e9b67e912476ffffec3cc Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 20 Feb 2012 15:33:19 -0600 Subject: [PATCH] cleaning up bundle registration. --- laravel/bundle.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/laravel/bundle.php b/laravel/bundle.php index 4aa3483a..ea684ed5 100644 --- a/laravel/bundle.php +++ b/laravel/bundle.php @@ -63,7 +63,10 @@ public static function register($bundle, $config = array()) } static::$bundles[$bundle] = array_merge($defaults, $config); - + + // It is possible for the develoepr to specify auto-loader mappings + // directly on the bundle registration. This provides a convenient + // way to register mappings withuot a bootstrap. static::autoloading($bundle, $config); } @@ -138,9 +141,7 @@ protected static function autoloading($bundle, $config) { $path = trim(Bundle::path($bundle), DS); - $autoloads = array_get($config, 'autoloads', array()); - - foreach ($autoloads as $type => $mappings) + foreach (array_get($config, 'autoloads', array()) as $type => $mappings) { // When registering each type of mapping we'll replace the (:bundle) // place-holder with the path to the bundle's root directory, so