X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=public%2Findex.php;h=56cf3a27fb6119c75db0cd626237eed489fe6a5d;hb=904fc60f05894d6207e9ae85abda8c94283f7d28;hp=6c477eeee40c3f17b1b0e15ee3f0a4f678a494b3;hpb=a0cb332ac5d8e9f297920200d9e8099701051c89;p=mdref%2Fmdref diff --git a/public/index.php b/public/index.php index 6c477ee..56cf3a2 100644 --- a/public/index.php +++ b/public/index.php @@ -1,7 +1,14 @@ 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();