public static function authInit() { if (!Endpoint::$initDone) { Endpoint::$initDone = TRUE; # Init Auth try { self::$storage = new Storage(); // Check if Auth session already exist if (!self::$storage->config("config")) { header("HTTP/1.0 404 Not Found"); die("You cannot access this page directly."); } self::$auth = new Auth(self::$storage->config("config")); } catch (Exception $e) { header("HTTP/1.0 404 Not Found"); die("Oophs. Error!"); } } }
<?php require __DIR__ . '/../../bootstrap.php'; \Gatekeeper\Endpoint::process();