变更
This commit is contained in:
@@ -21,13 +21,12 @@ class BindForm implements InjectParameterInterface
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param object $class
|
* @param string $class
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @throws \Exception
|
|
||||||
*/
|
*/
|
||||||
public function dispatch(object $class, string $method): mixed
|
public function dispatch(string $class, string $method): mixed
|
||||||
{
|
{
|
||||||
$validator = new Validator();
|
$validator = new Validator();
|
||||||
$reflect = \Kiri::getDi()->getReflectionClass($this->formValidate);
|
$reflect = \Kiri::getDi()->getReflectionClass($this->formValidate);
|
||||||
@@ -42,7 +41,7 @@ class BindForm implements InjectParameterInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$manager = \Kiri::getDi()->get(Middleware::class);
|
$manager = \Kiri::getDi()->get(Middleware::class);
|
||||||
$manager->set($class::class, $method, ValidatorMiddleware::class, [$validator]);
|
$manager->set($class, $method, ValidatorMiddleware::class, [$validator]);
|
||||||
|
|
||||||
return $validator;
|
return $validator;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user