mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-11 03:38:40 +00:00
add same directory level search
This commit is contained in:
parent
b908e88f90
commit
6258b9259e
|
|
@ -53,6 +53,15 @@ function module_autoloader($class) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$class = \str_replace('Modules/', '/', $class);
|
||||
foreach ($paths as $path) {
|
||||
if (\is_file($file = $path . $class . '.php')) {
|
||||
include_once $file;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spl_autoload_register('module_autoloader');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user