/** * Start the server */ public static function start() { // Initializing session session_start(); // Setting up error handling PaladinErrorHandler::setErrorPageLocation("views/ErrorPage.html"); // Setting up debug if needed if (Paladin::config("app")->get("debug")) { $engine = Paladin::getViewingEngineManager()->getSelectedEngine(); if (get_class($engine) == 'Paladin\\Viewing\\TwigViewingEngine') { $engine->getTwig()->enableAutoReload(); $engine->getTwig()->enableDebug(); } } // Initializing CheckMethodLoader::create(); AppLoader::create(); // Creating files folder if needed if (!file_exists("files/")) { mkdir("files/"); } }