소스 검색

dev 2020-09

Max F 5 년 전
부모
커밋
017c405548
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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=[])