W index.php bootstrapie mam:
  1. <?php
  2. Zend_Db_Table::setDefaultAdapter($db);
  3. ?>


w indexController w akcji indexAction() mam:
  1. <?php
  2. Zend_Loader::loadClass('Category',FRONT_MODEL);
  3.  
  4. $departmentCategory = new Category();
  5. $departmentCategory->getDepartmentCategory();
  6. ?>


a z kolei w modelu Category.php mam:

  1. <?php
  2. class Category extends Zend_Db_Table_Abstract 
  3. {
  4. protected $_name = 'category';
  5. protected $_primary = 'id';
  6.  
  7. ...............
  8.  
  9. public function getDepartmentCategory()
  10. {
  11. $where = array('parent = ?' => '1');
  12. return $this->fetchAll($where);
  13. }
  14. ............
  15. ?>


i błąd:
  1. 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
  1. <?php
  2. public function __construct()
  3. {
  4.  
  5. }
  6. ?>


pozdrawiam