改名
This commit is contained in:
@@ -255,10 +255,13 @@ class Container extends BaseObject implements ContainerInterface
|
|||||||
return $this->_reflection[$class];
|
return $this->_reflection[$class];
|
||||||
}
|
}
|
||||||
$reflect = new ReflectionClass($class);
|
$reflect = new ReflectionClass($class);
|
||||||
if ($reflect->isAbstract() || $reflect->isTrait() || $reflect->isInterface()) {
|
if ($reflect->isAbstract() || $reflect->isTrait()) {
|
||||||
return $this->_reflection[$class] = $reflect;
|
return $this->_reflection[$class] = $reflect;
|
||||||
}
|
}
|
||||||
$construct = NoteManager::resolveTarget($reflect);
|
$construct = NoteManager::resolveTarget($reflect);
|
||||||
|
if ($reflect->isInterface()) {
|
||||||
|
return $this->_reflection[$class] = $reflect;
|
||||||
|
}
|
||||||
if (!empty($construct) && $construct->getNumberOfParameters() > 0) {
|
if (!empty($construct) && $construct->getNumberOfParameters() > 0) {
|
||||||
$this->_constructs[$class] = $construct;
|
$this->_constructs[$class] = $construct;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user