modify
This commit is contained in:
@@ -75,20 +75,18 @@ class Node extends HttpService
|
|||||||
$controller = implode('\\', $this->namespace) . '\\' . $controller;
|
$controller = implode('\\', $this->namespace) . '\\' . $controller;
|
||||||
}
|
}
|
||||||
$this->handler = $this->getReflect($controller, $action);
|
$this->handler = $this->getReflect($controller, $action);
|
||||||
|
|
||||||
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
|
|
||||||
} else if ($handler != null && !is_callable($handler, true)) {
|
} else if ($handler != null && !is_callable($handler, true)) {
|
||||||
$this->_error = 'Controller is con\'t exec.';
|
$this->_error = 'Controller is con\'t exec.';
|
||||||
} else if ($handler instanceof Closure) {
|
} else if ($handler instanceof Closure) {
|
||||||
$this->handler = $handler;
|
$this->handler = $handler;
|
||||||
|
|
||||||
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
|
|
||||||
} else {
|
} else {
|
||||||
[$controller, $action] = $this->handler = $handler;
|
[$controller, $action] = $this->handler = $handler;
|
||||||
if (!($controller instanceof Controller)) {
|
if (!($controller instanceof Controller)) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
$this->annotationInject(get_class($controller), $action);
|
$this->annotationInject(get_class($controller), $action);
|
||||||
|
}
|
||||||
|
if (!empty($this->handler)) {
|
||||||
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
|
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
|
|||||||
Reference in New Issue
Block a user