generate static pages with league/commonmark
[mdref/mdref] / public / index.php
index 2e43a16b22b6bf5a46973c561963242a9d7e31b2..65ad2d2e033f457b91500e7a444d65fd46c9b450 100644 (file)
@@ -6,9 +6,6 @@ use http\Env\Request;
 use http\Env\Response;
 use function ini_get;
 use function ini_set;
-use function spl_autoload_register;
-use function strncmp;
-use function strtr;
 use const GLOB_ONLYDIR;
 use const PATH_SEPARATOR;
 use const REFS;
@@ -23,11 +20,7 @@ if (!ini_get("date.timezone")) {
        date_default_timezone_set("UTC");
 }
 
-spl_autoload_register(function($c) {
-       if (!strncmp($c, "mdref\\", 6)) {
-               return require ROOT . "/" . strtr($c, "\\", "/") . ".php";
-       }
-});
+require_once __DIR__ . "/../vendor/autoload.php";
 
 $response = new Response;
 $ehandler = new ExceptionHandler($response);