Max F 5 lat temu
rodzic
commit
017c405548
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      src/Routing/Router.php

+ 5 - 0
src/Routing/Router.php

@@ -56,6 +56,11 @@ class Router
 		return $route;
 	}
 
+	public static function error404($callback=null)
+	{
+		return self::all('.*', $callback, 'regex');
+	}
+
 
 	// Allow whatever method (GET, POST, HEAD, OPTION, DELETE, PUT, ...)
 	public static function all($url_match, $callback=null, $type_match='exact', $regex_params=[])