⬆️ update dependencies and add an autoload if used without composer

This commit is contained in:
Shikiryu authored and Shikiryu committed 2023-04-17 14:40:26 +02:00
1 parent e2febcfacf
commit 09d16fb74b
3 files changed
+40 -8

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
<?php
spl_autoload_register(static function ($class) {
$folders = explode('\\', $class);
if ($folders[0] === 'Shikiryu' && $folders[1] === 'SRSS') {
$folders = array_slice($folders, 2);
$path = sprintf('%s%ssrc%s%s.php',
__DIR__,
DIRECTORY_SEPARATOR,
DIRECTORY_SEPARATOR,
implode(DIRECTORY_SEPARATOR, $folders)
);
if (file_exists($path)) {
require $path;
}
}
});