Refactor loader for performance.

This commit is contained in:
Taylor Otwell 2011-08-08 14:29:19 -05:00
parent e3785ee7ff
commit 4465c02789
1 changed files with 2 additions and 2 deletions

View File

@ -19,9 +19,9 @@ public static function load($packages)
{
foreach ((array) $packages as $package)
{
if (file_exists($bootstrap = PACKAGE_PATH.$package.'/bootstrap'.EXT))
if ( ! static::loaded($package) and file_exists($bootstrap = PACKAGE_PATH.$package.'/bootstrap'.EXT))
{
require_once $bootstrap;
require $bootstrap;
}
static::$loaded[] = $package;