This commit is contained in:
2021-04-25 15:42:59 +08:00
parent ed199261be
commit 3b0e0a504f
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ class Container extends BaseObject
public function get($class, $constrict = [], $config = []): mixed
{
if (isset($this->_singletons[$class])) {
return $this->_singletons[$class];
return clone $this->_singletons[$class];
} else if (!isset($this->_constructs[$class])) {
return $this->resolve($class, $constrict, $config);
}