| 12345678910111213141516171819202122232425 |
- <?php
- declare(strict_types=1);
- $root = dirname(__DIR__, 2);
- $autoload = $root . '/vendor/autoload.php';
- if (is_file($autoload)) {
- require $autoload;
- }
- spl_autoload_register(function (string $class) use ($root): void {
- $prefix = 'AuditExpress\\';
- if (!str_starts_with($class, $prefix)) {
- return;
- }
- $relative = substr($class, strlen($prefix));
- $path = $root . '/src/' . str_replace('\\', '/', $relative) . '.php';
- if (is_file($path)) {
- require $path;
- }
- });
- return $root;
|