改名
This commit is contained in:
@@ -532,6 +532,9 @@ class Node extends HttpService
|
||||
if ($this->handler instanceof Closure) {
|
||||
return call_user_func($this->handler, ...$dispatchParams);
|
||||
}
|
||||
|
||||
var_dump($dispatchParams);
|
||||
|
||||
$validator = $this->getValidator();
|
||||
if (!($validator instanceof Validator)) {
|
||||
return call_user_func($this->callback, ...$dispatchParams);
|
||||
|
||||
@@ -52,13 +52,24 @@ class Reduce
|
||||
private static function core(): Closure
|
||||
{
|
||||
return function ($stack, $pipe) {
|
||||
return function ($passable) use ($stack, $pipe) {
|
||||
if ($pipe instanceof Middleware) {
|
||||
return $pipe->onHandler($passable, $stack);
|
||||
} else {
|
||||
return call_user_func($pipe, $passable, $stack);
|
||||
}
|
||||
};
|
||||
return static::passable($stack, $pipe);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $stack
|
||||
* @param $pipe
|
||||
* @return Closure
|
||||
*/
|
||||
public static function passable($stack, $pipe): Closure
|
||||
{
|
||||
return function ($passable) use ($stack, $pipe) {
|
||||
if (!($pipe instanceof Middleware)) {
|
||||
return call_user_func($pipe, $passable, $stack);
|
||||
} else {
|
||||
return $pipe->onHandler($passable, $stack);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user