File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ final class Route {
4949 */
5050 public function __construct (String $ method , String $ pattern , $ callback ) {
5151 $ this ->method = $ this ->validateMethod (strtoupper ($ method ));
52- $ this ->pattern = $ pattern ;
52+ $ this ->pattern = cleanUrl ( $ pattern) ;
5353 $ this ->callback = $ callback ;
5454 }
5555
@@ -60,7 +60,7 @@ private function validateMethod(string $method) {
6060 if (in_array (strtoupper ($ method ), $ this ->list_method ))
6161 return $ method ;
6262
63- throw new Exception ('Invalid Method Name ' );
63+ throw new Exception ('Invalid Method Name ' );
6464 }
6565
6666 /**
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ private function getMatchRoutersByRequestMethod() {
118118 private function getMatchRoutersByPattern ($ pattern ) {
119119 $ this ->matchRouter = [];
120120 foreach ($ pattern as $ value ) {
121- if ($ this ->dispatch ($ this ->url , $ value ->getPattern ()))
121+ if ($ this ->dispatch (cleanUrl ( $ this ->url ) , $ value ->getPattern ()))
122122 array_push ($ this ->matchRouter , $ value );
123123 }
124124 }
You can’t perform that action at this time.
0 commit comments