WidgetWrapper::getInstance(false); // Closing stuff WidgetWrapper::destroyInstance(); } catch (Exception $e) { $log = new Logger('movim'); $log->pushHandler(new SyslogHandler('movim')); $log->addInfo($e->getMessage()); if (ENVIRONMENT === 'development' && !FAIL_SAFE) { ?> <div id="final_exception" class="error debug"> <h2>An error happened</h2> <p><?php print $e->getMessage(); ?> </p> </div> <?php } elseif (!FAIL_SAFE) { ?> <div class="carreful"> <h2> Oops... something went wrong.</h2> <p>But don't panic. The NSA is on the case.</p> </div> <?php } if (FAIL_SAFE) { $r = new Route(); $rqst = new FrontController(); $rqst->handle(); } }
<?php require_once __DIR__ . '/Request.php'; require_once __DIR__ . '/Routing.php'; require_once __DIR__ . '/Response.php'; require_once __DIR__ . '/FrontController.php'; $request = new Request(); $routing = new Routing(); $controller = new FrontController($routing); $response = $controller->handle($request); $response->render();