This commit is contained in:
2021-02-23 17:43:13 +08:00
parent 29fc384741
commit 1c0cd04fcc
6 changed files with 37 additions and 14 deletions
+4 -2
View File
@@ -26,15 +26,17 @@ class Dispatch
protected mixed $request;
/**
* @param $handler
* @param $request
* @return static
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
*/
public static function create($handler, $request): static
{
$class = objectPool(get_called_class());
$class = new static();
$class->handler = $handler;
$class->request = $request;
if ($handler instanceof Closure) {