Skip to content

Commit e996093

Browse files
committed
cleaning up bundle registration.
1 parent 5c66658 commit e996093

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

laravel/bundle.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ public static function register($bundle, $config = array())
6363
}
6464

6565
static::$bundles[$bundle] = array_merge($defaults, $config);
66-
66+
67+
// It is possible for the develoepr to specify auto-loader mappings
68+
// directly on the bundle registration. This provides a convenient
69+
// way to register mappings withuot a bootstrap.
6770
static::autoloading($bundle, $config);
6871
}
6972

@@ -138,9 +141,7 @@ protected static function autoloading($bundle, $config)
138141
{
139142
$path = trim(Bundle::path($bundle), DS);
140143

141-
$autoloads = array_get($config, 'autoloads', array());
142-
143-
foreach ($autoloads as $type => $mappings)
144+
foreach (array_get($config, 'autoloads', array()) as $type => $mappings)
144145
{
145146
// When registering each type of mapping we'll replace the (:bundle)
146147
// place-holder with the path to the bundle's root directory, so

0 commit comments

Comments
 (0)