This commit is contained in:
2020-08-31 22:33:50 +08:00
parent 32913fa3e1
commit 8b583f2a4d
14 changed files with 450 additions and 102 deletions
+3 -5
View File
@@ -61,12 +61,10 @@ class Dispatch
*/
protected function bindParam()
{
/** @var Controller $controller */
if (is_array($this->handler)) {
$controller = $this->handler[0];
} else {
$controller = $this->handler;
if ($this->handler instanceof \Closure) {
return;
}
$controller = $this->handler[0];
$controller->request = Context::getContext('request');
$controller->headers = $controller->request->headers;
$controller->input = $controller->request->params;