|
10 | 10 | spl_autoload_register(function ($class) {
|
11 | 11 | $file = null;
|
12 | 12 |
|
13 |
| - if (0 === strpos($class,'MyLib\File\Example\\')) { |
14 |
| - $path = str_replace('\\', '/', substr($class, strlen('MyLib\File\Example\\'))); |
15 |
| - $file = dirname(__DIR__) . "/examples/{$path}.php"; |
16 |
| - } elseif (0 === strpos($class,'MyLib\File\Test\\')) { |
17 |
| - $path = str_replace('\\', '/', substr($class, strlen('MyLib\File\Test\\'))); |
| 13 | + if (0 === strpos($class,'MyLib\ObjUtil\Example\\')) { |
| 14 | + $path = str_replace('\\', '/', substr($class, strlen('MyLib\ObjUtil\Example\\'))); |
| 15 | + $file = dirname(__DIR__) . "/example/{$path}.php"; |
| 16 | + } elseif (0 === strpos($class,'MyLib\ObjUtil\Test\\')) { |
| 17 | + $path = str_replace('\\', '/', substr($class, strlen('MyLib\ObjUtil\Test\\'))); |
18 | 18 | $file = dirname(__DIR__) . "/{$path}.php";
|
19 |
| - } elseif (0 === strpos($class,'MyLib\File\\')) { |
20 |
| - $path = str_replace('\\', '/', substr($class, strlen('MyLib\File\\'))); |
| 19 | + } elseif (0 === strpos($class,'MyLib\ObjUtil\\')) { |
| 20 | + $path = str_replace('\\', '/', substr($class, strlen('MyLib\ObjUtil\\'))); |
21 | 21 | $file = dirname(__DIR__) . "/src/{$path}.php";
|
22 | 22 | }
|
23 | 23 |
|
|
0 commit comments