This commit is contained in:
2023-04-16 12:23:16 +08:00
parent 93f10ade37
commit e9f3499f2f
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class ContainerParams implements InjectParameterInterface
* @return mixed|null * @return mixed|null
* @throws \Exception * @throws \Exception
*/ */
public function dispatch(): mixed public function dispatch(object $class, string $method): mixed
{ {
return Container::instance()->get($this->value); return Container::instance()->get($this->value);
} }
+1 -1
View File
@@ -27,7 +27,7 @@ class ServiceParams implements InjectParameterInterface
* @return mixed|null * @return mixed|null
* @throws Exception * @throws Exception
*/ */
public function dispatch(): mixed public function dispatch(object $class, string $method): mixed
{ {
$service = Container::instance()->get(LocalService::class); $service = Container::instance()->get(LocalService::class);
+6 -1
View File
@@ -7,6 +7,11 @@ interface InjectParameterInterface
{ {
public function dispatch(): mixed; /**
* @param object $class
* @param string $method
* @return mixed
*/
public function dispatch(object $class, string $method): mixed;
} }