This commit is contained in:
2021-10-28 17:11:20 +08:00
parent b68fc5de60
commit 9269a1a23e
4 changed files with 5 additions and 11 deletions
+1 -4
View File
@@ -255,13 +255,10 @@ class Container extends BaseObject implements ContainerInterface
return $this->_reflection[$class];
}
$reflect = new ReflectionClass($class);
if ($reflect->isAbstract() || $reflect->isTrait()) {
if ($reflect->isAbstract() || $reflect->isTrait() || $reflect->isInterface()) {
return $this->_reflection[$class] = $reflect;
}
$construct = NoteManager::resolveTarget($reflect);
if ($reflect->isInterface()) {
return $this->_reflection[$class] = $reflect;
}
if (!empty($construct) && $construct->getNumberOfParameters() > 0) {
$this->_constructs[$class] = $construct;
}