summaryrefslogtreecommitdiff
path: root/autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'autoload.php')
-rw-r--r--autoload.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/autoload.php b/autoload.php
new file mode 100644
index 0000000..cb673fa
--- /dev/null
+++ b/autoload.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+spl_autoload_register(function (string $class)
+{
+ $base_dir = __DIR__ . '/src/';
+
+ $file = $base_dir . str_replace('\\', '/', $class) . '.php';
+
+ if (file_exists($file)) {
+ require $file;
+ }
+});