无法从控制器调用 getModel

cant call getModel from controller

我正在为 Joomla 3.x 开发一个组件,但我遇到了 JControllerLegacy getModel 的问题。当我尝试从我的 controller.php 中调用它时,在 class CasethandlerController 的显示函数中,它中断了执行,没有错误,只是一个空白页面,就好像该函数未定义一样。完全相同的代码在我的本地开发服务器上运行良好,但在生产服务器上进行此调用时失败。函数如下:

    function display($cachable = false, $urlparams = false) 
    {
        $this->configuration = getConfiguration();
        // set default view if not set
        $input = JFactory::getApplication()->input;
        $input->set('view', $input->getCmd('view', 'Casehandler'));
        $view = $this->getView( $input->get('view'), 'html' );
        echo 'model:';
        $model = $this->getModel('Casehandler');// closing single quote missing here

        echo 'model done.';
        $view->setModel($model, true );
        $view->setLayout( 'default' );
        $view->display();
    }

"model:" 得到回显而 "model done." 没有。我试图通过回显模型 class 内部的行来调试它,但也没有任何回应。调用不带参数的 getModel() 也会产生相同的结果。当完全相同的代码在我的本地服务器上运行良好时,这可能是什么问题?

通过在 getModel 函数中回显来自 JControllerLegacy class 的行进一步调试,我从 $prefix 变量中得到提示,显示模型名称为 casehandlerModel 而不是 CasehandlerModel,将模型的文件名从casehandler.php 到 Casehandler.php 并解决了问题...