Im currently running throught the 'Pro zend framework techniques' book but ive hit a snag which im not quite sure where to look...
The error from the php error log is:
[05-Nov-2011 10:51:53] PHP Fatal error: Class 'Model_Bug' not found in C:\Program Files (x86)\Zend\Apache2\htdocs\zfcms\application\controllers\BugController.php on line 12
which is:
$bugModel = new Model_Bug();
- Code: Select all
public function submitAction()
{
$bugReportForm = new Form_BugReportForm();
$bugReportForm->setAction('/bug/submit');
$bugReportForm->setMethod('post');
if ($this->getRequest()->isPost()) {
if ($bugReportForm->isValid($_POST)) {
$bugModel = new Model_Bug();
// if the form is valid then create the new bug
$result = $bugModel->createBug(
$bugReportForm->getValue('author'),
$bugReportForm->getValue('email'),
$bugReportForm->getValue('date'),
$bugReportForm->getValue('url'),
$bugReportForm->getValue('description'),
$bugReportForm->getValue('priority'),
$bugReportForm->getValue('status')
);
// if the createBug method returns a result
// then the bug was successfully created
if ($result) {
$this->_forward('confirm');
}
}
}
$this->view->form = $bugReportForm;
}
But what im not sure about is why isnt it calling the class ...
Any help or tips would be greatful...
Cheers
Chris

