This commit is contained in:
as2252258@163.com
2021-02-23 02:33:55 +08:00
parent 7fe199095f
commit 13e34351f2
+3 -3
View File
@@ -73,11 +73,11 @@ class Container extends BaseObject
if (is_callable($definition, TRUE)) {
return call_user_func($definition, $this, $constrict, $config);
} else if (is_array($definition)) {
$definition = $this->_constructs[$class] ?? [];
$constructs = $this->_constructs[$class] ?? [];
if ($class === $definition['class']) {
$object = $this->resolve($class, $definition, $config);
$object = $this->resolve($class, $constructs, $config);
} else {
$object = $this->get($class, $definition, $config);
$object = $this->get($class, $constructs, $config);
}
return $this->_singletons[$class] = $object;
} else if (is_object($definition)) {