我对 Code Igniter 钩子有疑问。我正在触发以下两个钩子。第一个是单例。第二个是普通班。
$hook['post_controller_constructor'] = array(
'class' => 'LoggedInUser',
'function' => 'getInstance',
'filename' => 'LoggedInUser.php',
'filepath' => 'hooks',
'params' => ""
);
$hook['post_controller_constructor'] = array(
'class' => 'SecureController',
'function' => 'verifyCredentials',
'filename' => 'SecureController.php',
'filepath' => 'hooks',
'params' => ""
);
当我尝试访问 SecureController 类中的 LoggedInUser::methodName() 时,出现错误。
消息:找不到类“LoggedInUser”