X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=public%2Findex.php;h=853c0916398ec77e7878c34c8ec99ff8d5aaa2e0;hb=17dc7637588fb5d34bdc13e17e52db49f02bd3d8;hp=d4518cd3a26691a5387aea740d173ea90cc09703;hpb=f38828a34ee165669db60ac17a4befaf91c05119;p=mdref%2Fmdref diff --git a/public/index.php b/public/index.php index d4518cd..853c091 100644 --- a/public/index.php +++ b/public/index.php @@ -1,25 +1,27 @@ 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); + +ob_start($response); +$action->handle(); +ob_end_flush(); +$response->send();