改名
This commit is contained in:
@@ -119,10 +119,11 @@ class Container extends BaseObject
|
|||||||
private function resolve($class, $constrict, $config): object
|
private function resolve($class, $constrict, $config): object
|
||||||
{
|
{
|
||||||
[$reflect, $dependencies] = $this->resolveDependencies($class);
|
[$reflect, $dependencies] = $this->resolveDependencies($class);
|
||||||
if (!empty($constrict)) {
|
foreach ($constrict as $index => $param) {
|
||||||
foreach ($constrict as $index => $param) {
|
if (is_array($param)) {
|
||||||
$dependencies[$index] = $param;
|
continue;
|
||||||
}
|
}
|
||||||
|
$dependencies[$index] = $param;
|
||||||
}
|
}
|
||||||
if (!$reflect->isInstantiable()) {
|
if (!$reflect->isInstantiable()) {
|
||||||
throw new Exception($reflect->getName() . ' con\'t instantiable');
|
throw new Exception($reflect->getName() . ' con\'t instantiable');
|
||||||
|
|||||||
Reference in New Issue
Block a user