我有一个测试模块。在测试模块中,我在窗体文件夹中有一个窗体。无法访问模块控制器中的模块表单
myproject的/应用/模块/测试/形式/ TestForm.php
class Test_Form_TestForm extends Zend_Form {
//form elements
}
myproject的/应用/模块/测试/控制器/ TestController.php
class Test_TestController extends Zend_Controller_Action {
public function indexAction() {
$this->view->form = new Test_Form_TestForm(); // this is generating error
}
} // end class
表格初始化在控制器中产生以下错误:
Fatal error: Class 'Test_Form_TestForm' not found in C:\wamp\www\student\application\modules\notification\controllers\NotificationController.php on line 16
如何使此表单在控制器中可访问。同一类型的案件正在使用默认控制器。我知道我必须使用Form_指示器在引导程序中注册模块,但不知道确切的语法。
主Bootstrap中的最短路径... – Awan 2011-02-08 18:24:18