<?php

declare(strict_types=1);

use RainbowDrive\Support\ErrorHandler;
use RainbowDrive\Support\LegacyAutoload;
use RainbowDrive\Support\Psr4Autoloader;

require_once __DIR__ . '/src/Support/Psr4Autoloader.php';
require_once __DIR__ . '/src/Support/LegacyAutoload.php';
require_once __DIR__ . '/src/Support/ErrorHandler.php';

(new ErrorHandler())->register();

$psr4 = new Psr4Autoloader();
$psr4->addNamespace('RainbowDrive\\', __DIR__ . '/src');
$psr4->register();

(new LegacyAutoload(__DIR__))->register();
