Making autoloader act nicer to autoloaders that may be running in parallel

This commit is contained in:
Irakli Nadareishvili
2012-05-22 13:39:44 -03:00
parent ca2e4aa4a1
commit 703c3ceb90
+4 -1
View File
@@ -52,7 +52,10 @@ class Autoloader
{
if (0 === strpos($className, $this->prefix)) {
$parts = explode('\\', substr($className, $this->prefixLength));
require($this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php');
$filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';
if (file_exists($filepath)) {
require_once($filepath);
}
}
}
}