modify
This commit is contained in:
@@ -103,12 +103,12 @@ class Container extends BaseObject
|
|||||||
if (!$reflect->isInstantiable()) {
|
if (!$reflect->isInstantiable()) {
|
||||||
throw new NotFindClassException($reflect->getName());
|
throw new NotFindClassException($reflect->getName());
|
||||||
}
|
}
|
||||||
|
$this->_param[$class] = $config;
|
||||||
|
|
||||||
$dependencies = $this->_constructs[$class] ?? [];
|
$dependencies = $this->_constructs[$class] ?? [];
|
||||||
if (empty($config)) {
|
if (empty($config)) {
|
||||||
return $reflect->newInstanceArgs($dependencies);
|
return $reflect->newInstanceArgs($dependencies);
|
||||||
}
|
}
|
||||||
$this->_param[$class] = $config;
|
|
||||||
|
|
||||||
if (!empty($dependencies) && $reflect->implementsInterface('Snowflake\Abstracts\Configure')) {
|
if (!empty($dependencies) && $reflect->implementsInterface('Snowflake\Abstracts\Configure')) {
|
||||||
$dependencies[count($dependencies) - 1] = $config;
|
$dependencies[count($dependencies) - 1] = $config;
|
||||||
|
|||||||
Reference in New Issue
Block a user