改名
This commit is contained in:
@@ -47,6 +47,7 @@ class Router
|
|||||||
* @param string|array $method
|
* @param string|array $method
|
||||||
* @param string $route
|
* @param string $route
|
||||||
* @param string|Closure $closure
|
* @param string|Closure $closure
|
||||||
|
* @throws \ReflectionException
|
||||||
*/
|
*/
|
||||||
public function addRoute(string|array $method, string $route, string|Closure $closure)
|
public function addRoute(string|array $method, string $route, string|Closure $closure)
|
||||||
{
|
{
|
||||||
@@ -61,7 +62,8 @@ class Router
|
|||||||
$this->addMiddlewares($controller, $closure[0]);
|
$this->addMiddlewares($controller, $closure[0]);
|
||||||
}
|
}
|
||||||
foreach ($method as $value) {
|
foreach ($method as $value) {
|
||||||
HandlerManager::add($route, $value, $closure);
|
HandlerManager::add($route, $value,
|
||||||
|
new Handler($route, $closure));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user