This commit is contained in:
as2252258@163.com
2021-02-23 02:05:21 +08:00
parent 2ccbd71787
commit dc1ce50137
+9 -12
View File
@@ -97,10 +97,6 @@ class Container extends BaseObject
throw new NotFindClassException($reflect->getName()); throw new NotFindClassException($reflect->getName());
} }
if ($class == HttpHeaders::class) {
var_dump($class);
}
$dependencies = $this->_constructs[$class] ?? []; $dependencies = $this->_constructs[$class] ?? [];
if (empty($config)) { if (empty($config)) {
return $reflect->newInstanceArgs($dependencies); return $reflect->newInstanceArgs($dependencies);
@@ -147,14 +143,15 @@ class Container extends BaseObject
$reflection = $this->_reflection[$class]; $reflection = $this->_reflection[$class];
} }
// if (!is_null($construct = $reflection->getConstructor())) { if (!is_null($construct = $reflection->getConstructor())) {
// $this->_constructs[$class] = $this->resolveMethodParam($construct, $constrict); $this->_constructs[$class] = $this->resolveMethodParam($construct, $constrict);
// } else { } else {
// if ($class == HttpHeaders::class) { $this->_constructs[$class] = $constrict;
// var_dump($constrict); }
// }
// $this->_constructs[$class] = $constrict; if ($class == HttpHeaders::class) {
// } var_dump($constrict, $this->_constructs[$class]);
}
return $reflection; return $reflection;
} }