改名
This commit is contained in:
@@ -215,6 +215,9 @@ class Container extends BaseObject
|
||||
*/
|
||||
private function resolveDependencies($class): ?array
|
||||
{
|
||||
if (!isset($this->_constructs[$class])) {
|
||||
$this->_constructs[$class] = ['class' => $class];
|
||||
}
|
||||
if (isset($this->_reflection[$class])) {
|
||||
return [$this->_reflection[$class], $this->_constructs[$class] ?? []];
|
||||
}
|
||||
@@ -223,15 +226,14 @@ class Container extends BaseObject
|
||||
if (!$reflection->isInstantiable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->scanProperty($reflection);
|
||||
|
||||
$this->_reflection[$class] = $reflection;
|
||||
|
||||
if (!is_null($construct = $reflection->getConstructor())) {
|
||||
$this->_constructs[$class] = $this->resolveMethodParam($construct);
|
||||
$this->_constructs[$class] = array_merge($this->_constructs[$class],
|
||||
$this->resolveMethodParam($construct)
|
||||
);
|
||||
}
|
||||
|
||||
return [$reflection, $this->_constructs[$class] ?? []];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user