I am a new zend framework user and I am having a problem in instantiating an
instance of one of my model inside an action controller.
I have one model as shown below
require_once 'Zend/Db/Table/Abstract.php';
class Category extends Zend_Db_Table_Abstract{
protected $_name = 'category';
}
The controller is as shown below:
require_once 'Zend/Controller/Action.php';
class CatController extends Zend_Controller_Action {
public $cat;
public function init() {
$this->cat = new Category();
}
public function indexAction() {
}
}
But I am getting the below message and i don't know why:
Fatal error: Class 'Category' not found in
C:\wamp\www\eGal\application\controllers\CatController.php on line 21
any help is highly appreciated
--
View this message in context: http://www.nabble.com/Creating-an-instance-of-database-table-tp24795359p24795359.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论