<?php Zend_Db_Table::setDefaultAdapter($db); ?>
w indexController w akcji indexAction() mam:
<?php Zend_Loader::loadClass('Category',FRONT_MODEL); $departmentCategory = new Category(); $departmentCategory->getDepartmentCategory(); ?>
a z kolei w modelu Category.php mam:
<?php class Category extends Zend_Db_Table_Abstract { protected $_name = 'category'; protected $_primary = 'id'; ............... public function getDepartmentCategory() { return $this->fetchAll($where); } ............ ?>
i błąd:
Fatal error: Call to a member function select() on a non-object in D:\edulabs\shoppe\library\Zend\Db\Table\Abstract.php on line 1074
Co robie zle ?
trzeba bylo z klasy Category.php wywalic
<?php public function __construct() { } ?>
pozdrawiam