*/ require_once ("domframework/route.php"); require_once ("domframework/renderer.php"); session_start(); error_reporting (E_ALL); // Autoload des controllers spl_autoload_register ( function ($class) { if (file_exists ("controllers/controller_$class.php")) include "controllers/controller_$class.php"; }); $route = new route (); $route->debug =0 ; $route->get ("", function () { $a = new blog (); $a->listingHtml(); }); $route->get ("{articleid}.txt", function ($articleid) { $a = new blog (); $a->getTxt ($articleid); }); $route->get ("{articleid}.xml", function ($articleid) { $a = new blog (); $a->getXml ($articleid); }); $route->get ("{articleid}.json", function ($articleid) { $a = new blog (); $a->getJson ($articleid); }); $route->get ("{articleid}/edit", function ($articleid) { $a = new blog (); $a->editShow ($articleid); }); $route->post ("{articleid}/edit", function ($articleid) { $a = new blog (); $a->editSave ($articleid); }); $route->get ("{articleid}", function ($articleid) { $a = new blog (); $a->getHtml ($articleid); }); header ($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); echo "404 !";