modify
This commit is contained in:
+9
-12
@@ -97,10 +97,6 @@ class Container extends BaseObject
|
||||
throw new NotFindClassException($reflect->getName());
|
||||
}
|
||||
|
||||
if ($class == HttpHeaders::class) {
|
||||
var_dump($class);
|
||||
}
|
||||
|
||||
$dependencies = $this->_constructs[$class] ?? [];
|
||||
if (empty($config)) {
|
||||
return $reflect->newInstanceArgs($dependencies);
|
||||
@@ -147,14 +143,15 @@ class Container extends BaseObject
|
||||
$reflection = $this->_reflection[$class];
|
||||
}
|
||||
|
||||
// if (!is_null($construct = $reflection->getConstructor())) {
|
||||
// $this->_constructs[$class] = $this->resolveMethodParam($construct, $constrict);
|
||||
// } else {
|
||||
// if ($class == HttpHeaders::class) {
|
||||
// var_dump($constrict);
|
||||
// }
|
||||
// $this->_constructs[$class] = $constrict;
|
||||
// }
|
||||
if (!is_null($construct = $reflection->getConstructor())) {
|
||||
$this->_constructs[$class] = $this->resolveMethodParam($construct, $constrict);
|
||||
} else {
|
||||
$this->_constructs[$class] = $constrict;
|
||||
}
|
||||
|
||||
if ($class == HttpHeaders::class) {
|
||||
var_dump($constrict, $this->_constructs[$class]);
|
||||
}
|
||||
return $reflection;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user