mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Allow multiple paths for exists
This commit is contained in:
parent
067af207df
commit
3c466931c7
|
|
@ -96,6 +96,12 @@ class Autoloader
|
|||
$class = ltrim($class, '\\');
|
||||
$class = str_replace(['_', '\\'], '/', $class);
|
||||
|
||||
return file_exists(__DIR__ . '/../' . $class . '.php');
|
||||
foreach (self::$paths as $path) {
|
||||
if (file_exists($file = $path . $class . '.php')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user