This commit is contained in:
2021-03-23 10:36:44 +08:00
parent 27be3f4ca9
commit c394f4990b
+3 -1
View File
@@ -124,11 +124,13 @@ class Container extends BaseObject
private function resolve($class, $constrict, $config): object private function resolve($class, $constrict, $config): object
{ {
[$reflect, $dependencies] = $this->resolveDependencies($class, $constrict); [$reflect, $dependencies] = $this->resolveDependencies($class, $constrict);
if (empty($reflect)) {
throw new NotFindClassException($class);
}
foreach ($constrict as $index => $param) { foreach ($constrict as $index => $param) {
$dependencies[$index] = $param; $dependencies[$index] = $param;
} }
var_dump($reflect);
if (!$reflect->isInstantiable()) { if (!$reflect->isInstantiable()) {
throw new NotFindClassException($reflect->getName()); throw new NotFindClassException($reflect->getName());
} }