@@ -107,13 +107,13 @@ public function addFilter( string $filter ): void
107107 * @param array $routes
108108 * @param string $routeName
109109 * @param $function
110- * @param $filter
110+ * @param $filters string|array
111111 * @return RouteMap
112112 * @throws \Exception
113113 */
114- protected function addRoute ( array &$ routes , string $ routeName , $ function , $ filter ) : RouteMap
114+ protected function addRoute ( array &$ routes , string $ routeName , $ function , string | array $ filters ) : RouteMap
115115 {
116- $ route = new RouteMap ( $ routeName , $ function , $ filter ?? '' );
116+ $ route = new RouteMap ( $ routeName , $ function , $ filters ?? '' );
117117 $ routes [] = $ route ;
118118
119119 return $ route ;
@@ -122,49 +122,49 @@ protected function addRoute( array &$routes, string $routeName, $function, $filt
122122 /**
123123 * @param string $route
124124 * @param $function
125- * @param string|null $filter |null $filter
125+ * @param string|array |null $filters
126126 * @return RouteMap
127127 * @throws \Exception
128128 */
129- public function delete ( string $ route , $ function , ? string $ filter = null ) : RouteMap
129+ public function delete ( string $ route , $ function , string | array | null $ filters = null ) : RouteMap
130130 {
131- return $ this ->addRoute ( $ this ->_delete , $ route , $ function , $ filter );
131+ return $ this ->addRoute ( $ this ->_delete , $ route , $ function , $ filters ?? '' );
132132 }
133133
134134 /**
135135 * @param string $route
136136 * @param $function
137- * @param string|null $filter |null $filter
137+ * @param string|array |null $filters
138138 * @return RouteMap
139139 * @throws \Exception
140140 */
141- public function get ( string $ route , $ function , ? string $ filter = null ) : RouteMap
141+ public function get ( string $ route , $ function , string | array | null $ filters = null ) : RouteMap
142142 {
143- return $ this ->addRoute ( $ this ->_get , $ route , $ function , $ filter );
143+ return $ this ->addRoute ( $ this ->_get , $ route , $ function , $ filters ?? '' );
144144 }
145145
146146 /**
147147 * @param string $route
148148 * @param $function
149- * @param string|null $filter
149+ * @param string|array| null $filters
150150 * @return RouteMap
151151 * @throws \Exception
152152 */
153- public function post ( string $ route , $ function , ? string $ filter = null ) : RouteMap
153+ public function post ( string $ route , $ function , string | array | null $ filters = null ) : RouteMap
154154 {
155- return $ this ->addRoute ( $ this ->_post , $ route , $ function , $ filter );
155+ return $ this ->addRoute ( $ this ->_post , $ route , $ function , $ filters ?? '' );
156156 }
157157
158158 /**
159159 * @param string $route
160160 * @param $function
161- * @param string|null $filter |null $filter
161+ * @param string|array |null $filters
162162 * @return RouteMap
163163 * @throws \Exception
164164 */
165- public function put ( string $ route , $ function , ? string $ filter = null ) : RouteMap
165+ public function put ( string $ route , $ function , string | array | null $ filters = null ) : RouteMap
166166 {
167- return $ this ->addRoute ( $ this ->_put , $ route , $ function , $ filter );
167+ return $ this ->addRoute ( $ this ->_put , $ route , $ function , $ filters ?? '' );
168168 }
169169
170170 /**
0 commit comments