This commit is contained in:
as2252258@163.com
2021-02-23 03:02:34 +08:00
parent 3388ba7e0f
commit 74460526a4
2 changed files with 112 additions and 110 deletions
+3 -3
View File
@@ -63,9 +63,9 @@ 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);
}