mirror of
https://github.com/Karaka-Management/oms-Tools.git
synced 2026-01-11 15:18:43 +00:00
fix autoloader
This commit is contained in:
parent
43231a5e12
commit
a5e2340f51
|
|
@ -77,9 +77,23 @@ final class Autoloader
|
||||||
{
|
{
|
||||||
$class = \ltrim($class, '\\');
|
$class = \ltrim($class, '\\');
|
||||||
$class = \strtr($class, '_\\', '//');
|
$class = \strtr($class, '_\\', '//');
|
||||||
|
$class2 = $class;
|
||||||
|
|
||||||
|
$pos = \stripos($class, '/');
|
||||||
|
if ($pos !== false) {
|
||||||
|
$pos = \stripos($class, '/', $pos + 1);
|
||||||
|
|
||||||
|
if ($pos !== false) {
|
||||||
|
$class2 = \substr($class, $pos + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (self::$paths as $path) {
|
foreach (self::$paths as $path) {
|
||||||
if (\is_file($file = $path . $class . '.php')) {
|
if (\is_file($file = $path . $class2 . '.php')) {
|
||||||
|
include_once $file;
|
||||||
|
|
||||||
|
return;
|
||||||
|
} elseif (\is_file($file = $path . $class . '.php')) {
|
||||||
include_once $file;
|
include_once $file;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user