diff --git a/System/Di/Container.php b/System/Di/Container.php index 77ec06f9..ccea0a80 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -86,9 +86,6 @@ class Container extends BaseObject } else { throw new NotFindClassException($class); } - - Snowflake::configure($object, $config); - return $this->_singletons[$class] = $object; } diff --git a/System/Di/Service.php b/System/Di/Service.php index 2f2fe416..639682d7 100644 --- a/System/Di/Service.php +++ b/System/Di/Service.php @@ -60,6 +60,7 @@ class Service extends Component $object = Snowflake::createObject($config); } + Snowflake::configure($object, $config); return $this->_components[$id] = $object; }