From 08802355fe1974bde74dc09bbb15452d122d5767 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 23 Feb 2021 02:51:57 +0800 Subject: [PATCH] modify --- System/Di/Container.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/System/Di/Container.php b/System/Di/Container.php index 728b026d..dc27f37e 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -63,17 +63,13 @@ class Container extends BaseObject */ public function get($class, $constrict = [], $config = []): mixed { - if (isset($this->_singletons[$class])) { - return $this->_singletons[$class]; - } +// if (isset($this->_singletons[$class])) { +// return $this->_singletons[$class]; +// } if (!isset($this->_constructs[$class])) { return $this->resolve($class, $constrict, $config); } - if ($class == Connection::class) { - var_dump($class, $constrict, $config); - } - $definition = $this->_param[$class]; if (is_callable($definition, TRUE)) { return call_user_func($definition, $this, $constrict, $config);