在我的应用程序中安装 ZfcBase 和 ZfcUser 后,我收到错误消息:
'Module (ZfcUser) could not be initialized.' in Zend/ModuleManager/ModuleManager.php on line 140
我以完全相同的方式和位置安装了 ZfcBase 和 ZfcUser,并且 ZfcBase 正确加载。
ModuleManager.php 中的相关代码为:
/**
* Load a specific module by name.
*
* @param string $moduleName
* @throws Exception\RuntimeException
* @triggers loadModule.resolve
* @triggers loadModule
* @return mixed Module's Module class
*/
public function loadModule($moduleName)
{
if (isset($this->loadedModules[$moduleName])) {
return $this->loadedModules[$moduleName];
}
$event = ($this->loadFinished === false) ? clone $this->getEvent() : $this->getEvent();
$event->setModuleName($moduleName);
$this->loadFinished = false;
$result = $this->getEventManager()->trigger(ModuleEvent::EVENT_LOAD_MODULE_RESOLVE, $this, $event, function ($r) {
return (is_object($r));
});
$module = $result->last();
if (!is_object($module)) {
throw new Exception\RuntimeException(sprintf(
'Module (%s) could not be initialized.',
$moduleName
));
}
我将如何调试这个问题?