This commit is contained in:
2021-02-22 19:58:44 +08:00
parent df81cf7456
commit 01d5355c24
+2
View File
@@ -119,9 +119,11 @@ class Container extends BaseObject
private function resolve($class, $constrict, $config): object
{
[$reflect, $dependencies] = $this->resolveDependencies($class);
if (!empty($constrict)) {
foreach ($constrict as $index => $param) {
$dependencies[$index] = $param;
}
}
if (!$reflect->isInstantiable()) {
throw new Exception($reflect->getName() . ' con\'t instantiable');
}