/**
  * 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/");
     }
 }
 public function check($thing, $what)
 {
     if ($thing == "checkmethod") {
         $present = CheckMethodLoader::getCheckMethodLoader()->isCheckMethodLoaded($what);
     } else {
         if ($thing == "application") {
             $present = AppLoader::getAppLoader()->isApplicationLoaded($what);
         } else {
             return new Response(200, "First argument need to be checkmethod, or application");
         }
     }
     return new JsonResponse(array("present" => $present));
 }