改名
This commit is contained in:
@@ -55,7 +55,7 @@ class Middleware
|
||||
$middleWares = $this->annotation($node);
|
||||
$data = array_reduce(array_reverse($middleWares), $this->core(), $last);
|
||||
$this->middleWares = [];
|
||||
return $data;
|
||||
return $node->callback = $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -287,20 +287,7 @@ class Node extends Application
|
||||
if (empty($middles)) {
|
||||
return;
|
||||
}
|
||||
foreach ($middles as $middle) {
|
||||
if (empty($middle)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
if (is_array($middle)) {
|
||||
$_tmp = $this->each($middle, $_tmp);
|
||||
} else {
|
||||
$_tmp[] = Snowflake::createObject($middle);
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
}
|
||||
}
|
||||
$this->middleware = $_tmp;
|
||||
$this->middleware = $this->each($middles, $_tmp);
|
||||
$this->newExec();
|
||||
}
|
||||
|
||||
@@ -313,7 +300,7 @@ class Node extends Application
|
||||
if (!empty($this->handler)) {
|
||||
$made = new Middleware();
|
||||
$made->setMiddleWares($this->middleware);
|
||||
$this->callback = $made->getGenerate($this);
|
||||
$made->getGenerate($this);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user