aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/index.php b/index.php
index 54f1043..43603aa 100644
--- a/index.php
+++ b/index.php
@@ -1,17 +1,14 @@
<?php
-spl_autoload_register(function ($class) {
- $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
- require $file;
-});
+require __DIR__ . '/vendor/autoload.php';
-function autoload_glob(string $pattern) {
+function require_all_glob(string $pattern) {
foreach (glob($pattern) as $filename) {
require $filename;
}
}
-autoload_glob('routes/*.php');
-autoload_glob('misc/*.php');
+require_all_glob('routes/*.php');
+require_all_glob('misc/*.php');
WpfTest\Router::getInstance()->processRequest();