This commit is contained in:
2021-07-21 13:54:28 +08:00
parent cf052cb46b
commit a0d576ed91
+3 -4
View File
@@ -81,13 +81,12 @@ use Snowflake\Snowflake;
private function parseInjectValue(): mixed private function parseInjectValue(): mixed
{ {
if (class_exists($this->className)) { if (class_exists($this->className)) {
$injectValue = Snowflake::getDi()->get($this->className, $this->args); return Snowflake::getDi()->get($this->className, $this->args);
} else if (Snowflake::app()->has($this->className)) { } else if (Snowflake::app()->has($this->className)) {
$injectValue = Snowflake::app()->get($this->className); return Snowflake::app()->get($this->className);
} else { } else {
$injectValue = $this->className; return $this->className;
} }
return $injectValue;
} }
} }