From 2fe8e134dc6c0a0b7bf61d870488deaccac77afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sun, 25 Apr 2021 12:41:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Di/Container.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/System/Di/Container.php b/System/Di/Container.php index 83007819..77ec06f9 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -16,7 +16,6 @@ use ReflectionException; use ReflectionMethod; use ReflectionProperty; use Snowflake\Abstracts\BaseObject; -use Snowflake\Core\Json; use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; @@ -87,6 +86,9 @@ class Container extends BaseObject } else { throw new NotFindClassException($class); } + + Snowflake::configure($object, $config); + return $this->_singletons[$class] = $object; } @@ -109,7 +111,7 @@ class Container extends BaseObject $_className = $definition['class']; unset($definition['class']); - $config = array_merge($definition, $config); +// $config = array_merge($definition, $config); $definition = $this->mergeParam($class, $constrict); if ($_className === $class) {