setup(); } // The object is created from within the class itself // only if the class has no instance. public static function get_instance() { if (self::$instance == null) { self::$instance = new tts_setup(); } return self::$instance; } private static function setup(): void { \tts\site_helper::set_all_projects(['mockup', 'ex', 'live']); \tts\site_helper::set_default_project("mockup"); \tts\site_helper::init(PROJECT_BASE_DIR, "", "get", true); require_once PROJECT_BASE_DIR . 'main.php'; } public static function test_route(string $route): void { $PHPUNIT_Testing = true; \tts\site_helper::init(PROJECT_BASE_DIR, $route, "get", $PHPUNIT_Testing); } public static function do_routes() { $returned_route = \tts\router::execute(); if ($returned_route["found"] === true) { $condition = $returned_route["returned"]; } else { $app = new \tts\app(); $condition = $app->load_controller(); } return $condition; } }