This commit is contained in:
as2252258@163.com
2021-03-06 20:38:13 +08:00
parent 53218bb493
commit 7fa3d3b6a4
+2 -4
View File
@@ -75,20 +75,18 @@ class Node extends HttpService
$controller = implode('\\', $this->namespace) . '\\' . $controller;
}
$this->handler = $this->getReflect($controller, $action);
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
} else if ($handler != null && !is_callable($handler, true)) {
$this->_error = 'Controller is con\'t exec.';
} else if ($handler instanceof Closure) {
$this->handler = $handler;
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
} else {
[$controller, $action] = $this->handler = $handler;
if (!($controller instanceof Controller)) {
return $this;
}
$this->annotationInject(get_class($controller), $action);
}
if (!empty($this->handler)) {
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
}
return $this;