X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=public%2Findex.php;h=56cf3a27fb6119c75db0cd626237eed489fe6a5d;hb=904fc60f05894d6207e9ae85abda8c94283f7d28;hp=23a1be2cf1a8595337669918a3438a80f4ef27fe;hpb=b0d3f3493ade54e394d598c2e07ee330f13ad58b;p=mdref%2Fmdref diff --git a/public/index.php b/public/index.php index 23a1be2..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) - ->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();