Addin a sandbox enviorment to test the Library

This commit is contained in:
2026-08-20 07:50:24 -03:00
parent 5b6d9553ac
commit 84ed545c69
11 changed files with 260 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
include_once(__DIR__ . "/../src/Routes/Route.php");
include_once(__DIR__ . "/../src/Routes/RouteGroup.php");
include_once(__DIR__ . "/../src/Routes/HTTPCodes.php");
include_once(__DIR__ . "/../src/Routes/ObjectSpawners.php");
include_once(__DIR__ . "/../src/Routes/RouteCollection.php");
spl_autoload_register(function ($className) {
$path = explode('\\', $className);
$fileName = $path[sizeof($path) - 1];
$path[sizeof($path) - 1] = '';
$path = __DIR__ ."/". strtolower(implode(DIRECTORY_SEPARATOR, $path));
if (is_file($path . $fileName . '.php')) {
return include $path . $fileName . '.php';
}
if (is_file(strtolower($path . $fileName . '.php'))) {
return include strtolower($path . $fileName . '.php');
}
@include $path . $fileName . '.php';
});