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