modify
This commit is contained in:
+1
-12
@@ -98,21 +98,10 @@ class Container extends BaseObject
|
|||||||
*/
|
*/
|
||||||
private function resolveDefinition($definition, $class, $config, $constrict): mixed
|
private function resolveDefinition($definition, $class, $config, $constrict): mixed
|
||||||
{
|
{
|
||||||
if (!isset($definition['class'])) {
|
|
||||||
throw new NotFindClassException($class);
|
|
||||||
}
|
|
||||||
$_className = $definition['class'];
|
|
||||||
unset($definition['class']);
|
|
||||||
|
|
||||||
$config = array_merge($definition, $config);
|
$config = array_merge($definition, $config);
|
||||||
$definition = $this->mergeParam($class, $constrict);
|
$definition = $this->mergeParam($class, $constrict);
|
||||||
|
|
||||||
if ($_className === $class) {
|
return $this->_singletons[$class] = $this->resolve($class, $definition, $config);
|
||||||
$object = $this->resolve($class, $definition, $config);
|
|
||||||
} else {
|
|
||||||
$object = $this->get($class, $definition, $config);
|
|
||||||
}
|
|
||||||
return $this->_singletons[$class] = $object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user