path] = $route; } public static function findRoute(string $path, string $method): Action { if (self::$routes[$path]) { return self::$routes[$path]; } else { return self::$routes["/404"]; // default route 404 handling goes here } } public static function scan(string $routesPath): void { $src = realpath(__DIR__ . "/../"); foreach (glob($src . "/" . $routesPath) as $routeFile) { include $routeFile; } } }