X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=public%2Findex.php;h=56cf3a27fb6119c75db0cd626237eed489fe6a5d;hb=904fc60f05894d6207e9ae85abda8c94283f7d28;hp=1e6d37f83bcf26f45822e31c68db7065f5d65b45;hpb=6478b415c59070f70ed860f3a592377eef9783b1;p=mdref%2Fmdref diff --git a/public/index.php b/public/index.php index 1e6d37f..56cf3a2 100644 --- a/public/index.php +++ b/public/index.php @@ -1,27 +1,23 @@ add("mdref", ROOT); -use http\Controller; -use http\Controller\Url; -use http\Controller\Observer\Layout; - -use mdref\ExceptionHandler; -use mdref\Action; - new ExceptionHandler; -$ctl = new Controller; -$ctl->setDependency("baseUrl", new Url) - ->attach(new Action(["refpath" => REFS])) - ->attach(new Layout) - ->notify() - ->getResponse() - ->send(); +$reference = new Reference(($refs = getenv("REFPATH")) ? explode(PATH_SEPARATOR, $refs) : glob(ROOT."/refs/*")); +$action = new Action($reference, new Request, new Response, new BaseUrl); +$action->handle();