Permalink
Browse files

Improved the auto-loader.

  • Loading branch information...
1 parent 9d64b5d commit 1d1b17eee1b044abf14ab70c62ae74b0d366881f @bnowack committed Jan 27, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 PhLD.php
View
@@ -53,13 +53,16 @@ public static function autoload($className) {
$classPath,
str_replace('phld/', '', $classPath),
);
+ $found = false;
foreach ($dirs as $dir) {
foreach ($paths as $path) {
if (file_exists("$dir$path")) {
require("$dir$path");
+ $found = 1;
break;
}
}
+ if ($found) break;
}
self::$autoLoaded[$className] = true;
}

0 comments on commit 1d1b17e

Please sign in to comment.